Re: [PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-27 Thread Richard Lynch
I don't think it does know, nor care, nor should it... Why would it need to know that?... You may find the info you want in a backtrace function at http://php.net/ On Mon, February 26, 2007 8:15 am, clive wrote: Thanks Vincent,Stut and Olaf. Thats __file___ is exactly what I needed :) now

[PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-26 Thread clive
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

RE: [PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-26 Thread Vincent DUPONT
[mailto:[EMAIL PROTECTED] Sent: Mon 2/26/2007 14:44 To: PHP General List Subject: [PHP] $_SERVER['PHP_SELF'] in a included file 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

Re: [PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-26 Thread Stut
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

Re: [PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-26 Thread Stut
clive wrote: Thanks Vincent,Stut and Olaf. Thats __file___ is exactly what I needed :) now for another brain teaser for your collective brains, How does a function know what file it was called from. a.php includes functions.php in a.php we call function test(); which is declared in

Re: [PHP] $_SERVER['PHP_SELF'] in a included file

2007-02-26 Thread Jochem Maas
/26/2007 15:15 To: clive Cc: PHP General List Subject: Re: [PHP] $_SERVER['PHP_SELF'] in a included file Thanks Vincent,Stut and Olaf. Thats __file___ is exactly what I needed :) now for another brain teaser for your collective brains, How does a function know what file it was called from