Hi, I wonder if there's a way to find the line number of the calling script from a function, like the error messages PHP generates. An example:
In an included file I have a function and want to do something similar to: function foo($obj) { if (!is_object($obj)) { echo "Error: supplied argument is not an object in "; echo __FILE__ . " line " . __LINE__; } ... } But __FILE__ and __LINE__ refers to the current file, ie. the file with the function in, and not the file where the function is called from. The first one I can solve by using $SCRIPT_NAME, but what about the line number??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]