Hello,

Is there any way inside an included file to figure out what its actual
UNIX filename is ?

For example:

file1.php --
<?

include("file2.php");

?>

file2.php --
<?
/*want to do something like:
        if (this_file()=="file2.php") {
                ## do stuff
        } else if (this_file()=="file1.php") {
                ## do other stuff
        }
*/
?>

That is, file2.php needs to know whether it's executed in the context of
file1.php or autonomously. I guess I could change $PHP_SELF before
including file2.php in file1.php, but that seems like a bad hack, plus it
may screw up other code in file1.php, if there is any.

Any suggestions ?
M.



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

Reply via email to