hi, we have a msg that display the line number on error handler now i want know is there is a way to see the current line at normal operation for debug operation. thanks for your help ?
@NogDogDec 13.2008 — #You might possibly also want to take a look at [url=http://php.net/debug_backtrace[/url]debug_backtrace[/url]() and [url=http://php.net/debug_print_backtrace]debug_print_backtrace[/url]().
@NogDogDec 17.2008 — #You can grab whatever part(s) of the backtrace array you want: [code=php] $debug = debug_backtrace(); echo "Error at line " . $debug['line'] . " in file " . $debug['file']; [/code] It all depends on what you want to do. And in the above case, if that's all you want, it's simpler to just do: [code=php] echo "Error at line " . __LINE__ . " in file " . __FILE__; [/code]