note 25244 deleted from function.basename by spic

From: Date: Tue, 17 Sep 2002 09:06:27 +0000
Subject: note 25244 deleted from function.basename by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36781@lists.php.net to get a copy of this message
Secure way to do this: function funFilename($varFile_w_path) { $varFile_w_path=strrev($varFile_w_path); $varPos=strpos($varFile_w_path,"\\"); return strrev(substr($varFile_w_path,1,$varPos-1)); } The example works for instance with win32 paths on a linux server. Svein Johansen

« previous php.notes (#36781) next »