|
Posted by ZeldorBlat on 09/26/07 15:49
On Sep 26, 5:47 am, _q_u_a_m_i_s's <qua...@gmail.com> wrote:
> Hy,
> i need to make some sort of debug function, to be able to send some
> messages to a database or text file.
>
> I would like my function declaration to be something like this
> function debug($text){
> [....]
>
> }
>
> The weird thing is that i need to be able to print the file and line
> number from where it was called, so the output would be like this:
> Debug from "index.php" : line:"322", message: "bla bla bla bla".
>
> How can i find out the line and file from where it was called? i tried
> using __LINE__ and __FILE__ but it seems that they point to the file &
> line where the debug function is defined.
>
> Can anyone help?
<http://www.php.net/debug_backtrace>
[Back to original message]
|