get the filename of an include'd/require'd file?
| From: | John Ericson | Date: | Mon, 27 May 2002 12:45:05 +0000 |
| Subject: | get the filename of an include'd/require'd file? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-99352@lists.php.net to get a copy of this message | ||
Anyone knows how I can get the name of an include'd/require'd file and not
getting the name of the main file.
My scenario is like this:
a.php:
require "b.php";
b.php:
echo $_SERVER['PHP_SELF'];
echo $_SERVER['SCRIPT_NAME'];
I get a.php when I want to have b.php.
(Please CC me since Im not a member of the list)
--
* John Ericson john@john.pp.se
* ICQ: 7325429 JID: high@jabber.org
* web: http://john.pp.se