note 29126 added to function.strrchr
| From: | ahmed at somantic dot net | Date: | Mon, 03 Feb 2003 23:39:44 +0000 |
| Subject: | note 29126 added to function.strrchr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43345@lists.php.net to get a copy of this message | ||
I am not sure if there is a variable of function for this already but if you would like to know the
name of your script file (file name) try this:
For example; the code inside the file located at:
http://www.somantic.net/test/testing.php
contains:
<?PHP
$file_name = substr(strrchr($PHP_SELF, "/"), 1);
printf($file_name);
?>
The output would be:
testing.php
--
http://www.php.net/manual/en/function.strrchr.php
http://master.php.net/manage/user-notes.php?action=edit+29126
http://master.php.net/manage/user-notes.php?action=delete+29126
http://master.php.net/manage/user-notes.php?action=reject+29126