note 72093 added to function.basename
| From: | thovan at gmx dot net | Date: | Tue, 02 Jan 2007 15:24:27 +0000 |
| Subject: | note 72093 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121191@lists.php.net to get a copy of this message | ||
After reading all of the earlier comments, I made my own function file_basename():
<?php
function file_basename($file= null) {
if($file=== null || strlen($file)<= 0) {
return null;
}
$file= explode('?', $file);
$file= explode('/', $file[0]);
$basename= $file[count($file)-1];
return $basename;
}
?>
----
Server IP: 212.124.37.9
Probable Submitter: 212.122.40.233
----
Manual Page -- http://www.php.net/manual/en/function.basename.php
Edit -- https://master.php.net/note/edit/72093
Del: integrated -- https://master.php.net/note/delete/72093/integrated
Del: useless -- https://master.php.net/note/delete/72093/useless
Del: bad code -- https://master.php.net/note/delete/72093/bad+code
Del: spam -- https://master.php.net/note/delete/72093/spam
Del: non-english -- https://master.php.net/note/delete/72093/non-english
Del: in docs -- https://master.php.net/note/delete/72093/in+docs
Del: other reasons-- https://master.php.net/note/delete/72093
Reject -- https://master.php.net/note/reject/72093
Search -- https://master.php.net/manage/user-notes.php