clive wrote:
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.
__FILE__ will give you the path and filename of the current file.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php