Printing the calling file in a function
Posted: Tue Sep 28, 2010 4:49 pm
I have a function that writes to a log file, and I want to print the name of the calling file. For instance:
$output = $calling_file . ": $error";
so it looks like:
index.php: There was an error!
Even better would be a relative path like "/classes/GetData.php: There was an error!"
Any way to do either of these?
$output = $calling_file . ": $error";
so it looks like:
index.php: There was an error!
Even better would be a relative path like "/classes/GetData.php: There was an error!"
Any way to do either of these?