Todd wrote:
Hi,
Is it possible under PHP4 to get the name of the file that a function was called from? To clarify, here's an example of what I'd like to do:
--- main.php ---
<?php
include('include.php');
function foo(){
$include_file=file_that_called_foo();
printf($include_file);
}
?>
--- include.php ---
<?php
foo();
?>
Does anyone know of a way to do this? I've tried several different things, including to constant '__FILE__ ', but they all return the current file, I am needing the included filename.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php