NYCPHP Meetup

NYPHP.org

[nycphp-talk] who's calling me?

Rahmin Pavlovic rahmin at insite-out.com
Mon Jul 23 19:44:57 EDT 2007


Tom Sartain wrote:

> Check out debug_backtrace. http://us2.php.net/debug_backtrace
> There's plenty of helpful info in the array it returns.
> 

Sweet!  Here's what did it:

$_trace=debug_backtrace();
echo $_trace[0]['file'];

Outputs /path/to/calling/file, which is a different file in all cases.

Thank you for helping make this a hackless endeavour.





More information about the talk mailing list