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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 anyway for test(); to echo "called from a.php" with out passing 'a.php' or ___FILE___ as a parameter to the function?

Im busy googling now for a answer.

--
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.}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux