note 86343 added to function.basename

From: Date: Tue, 14 Oct 2008 10:18:01 +0000
Subject: note 86343 added to function.basename
Groups: php.notes 
Request: Send a blank email to php-notes+get-145336@lists.php.net to get a copy of this message
@pvollma at pcvsoftware dot net 13-Jul-2005 06:43 /* <?php $filen = stripslashes($_FILES['userfile']['name']); $newfile = basename($filen); if (strpos($newfile,'\\') !== false) { $tmp = preg_split("[\\\]",$newfile); $newfile = $tmp[count($tmp) - 1]; } ?> */ Why not work around the bug? basename(strip_slashes("\\","/",$windowsFilePath)); ---- Server IP: 89.248.170.61 Probable Submitter: 82.217.90.141 ---- Manual Page -- http://www.php.net/manual/en/function.basename.php Edit -- https://master.php.net/note/edit/86343 Del: integrated -- https://master.php.net/note/delete/86343/integrated Del: useless -- https://master.php.net/note/delete/86343/useless Del: bad code -- https://master.php.net/note/delete/86343/bad+code Del: spam -- https://master.php.net/note/delete/86343/spam Del: non-english -- https://master.php.net/note/delete/86343/non-english Del: in docs -- https://master.php.net/note/delete/86343/in+docs Del: other reasons-- https://master.php.net/note/delete/86343 Reject -- https://master.php.net/note/reject/86343 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145336) next »