$_SERVER['PHP_SELF'] in a included file
| From: | clive | Date: | Mon, 26 Feb 2007 13:44:40 +0000 |
| Subject: | $_SERVER['PHP_SELF'] in a included file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-249440@lists.php.net to get a copy of this message | ||
A project that I work on has a index.php that includes other files depending on certain requirements.
so index.php includes a.php;
in a.php if you echo $_SERVER['PHP_SELF'] it echos index.php and I understand why it does this.
But, I want echo the file name of a.php from a.php and I dont want to add a $filename='a.php'; at the top of a.php, although I have thought of using subversion and a find and replace to insert $filename="$Id$"; at the top of all the files.
Does anyone know know of another way I can get a included files filename?
Sorry if I have posted this question in the past, its been a while since I last thought of this problem.
Regards,
Clive.
Real Time Travel Connections
{No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.}