Todd <mailto:[EMAIL PROTECTED]>
    on Thursday, December 18, 2003 9:57 AM said:

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

[snip]

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

yes this would be very handy for error reporting purposes but alas it is
not to be. afaik there is no way to do what you want save passing
__FILE__ to the function...


functio foo($stuff, $more_stuff, $current_file)
{
        ... do stuff ...
}


<?php

        echo foo($thing, $other_thing, __FILE__);


?>

that's what i ended up doing.




chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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

Reply via email to