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 > :) > >

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

2007-02-26 Thread Jochem Maas
sy.be > > > > -Original Message- > From: clive [mailto:[EMAIL PROTECTED] > Sent: Mon 2/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

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 functions

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

2007-02-26 Thread Vincent DUPONT
cipal Consultant OpenSource Competence Center Ausy Belgium http://www.ausy.be -Original Message- From: clive [mailto:[EMAIL PROTECTED] Sent: Mon 2/26/2007 15:15 To: clive Cc: PHP General List Subject: Re: [PHP] $_SERVER['PHP_SELF'] in a included file Thanks Vincent,Stut

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

2007-02-26 Thread clive
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 functions.php Is there

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 Vincent DUPONT
hello, try with the system constant __FILE__ print(__FILE__); inside a.php should always return a.php, even though this is included into index.php. Vincent Dupont Principal Consultant OpenSource Competence Center Ausy Belgium http://www.ausy.be -Original Message- From: clive [mail