note 44804 added to function.basename
| From: | markus at 4pixels dot net | Date: | Tue, 17 Aug 2004 06:34:58 +0000 |
| Subject: | note 44804 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74790@lists.php.net to get a copy of this message | ||
Why not a one-liner to get the full name after the dir...
$filename = str_replace(dirname($_SERVER['SCRIPT_FILENAME']), '',
$_SERVER['SCRIPT_FILENAME']);
unless you have to do thousands of iterations I guess the str_replace wont kill nobody's
performance...
enjoy...
----
Manual Page -- http://www.php.net/manual/en/function.basename.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44804
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44804&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44804&report=yes
Search -- http://master.php.net/manage/user-notes.php