Re: getting the line number
| From: | Tim Traver | Date: | Mon, 07 Jun 2004 19:25:53 +0000 |
| Subject: | Re: getting the line number | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187834@lists.php.net to get a copy of this message | ||
That is exactly what I needed...
Thanks !
Tim.
At 12:04 PM 6/7/2004, Adam Bregenzer wrote:
On Mon, 2004-06-07 at 14:52, Tim Traver wrote: I have a script that includes a separate file for functions. In a particular function, if a query gets an error, write out a log file that explains the error. The thing I am trying to determine is from what line the call was made from the parent script to the subroutine. I know that I can get the line number of the current script, but that doesn't tell me where the function was called from... debug_backtrace[1] should get you everything you want and then some. [1] http://www.php.net/debug_backtrace -- Adam Bregenzer adam@bregenzer.net http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php