Does anyone know a way (even a slow way) to detect what line and file you're currently on?
When PHP reports errors it gives this information, but I'd like to make a little debugging script that tells me the same information even when the php script is working normally.
For example, if my query returns an empty result set, I'd like to log a message somewhere that says:
On line 112 of guestbook.php the SQL query "SELECT * FROM guestbook" returned 0 results.
Of course this is a very simplistic example, my hope is that my pages that have dozens of queries and several include/requires will be easier to debug.
Any help is greatly appreciated.