You are here: Re: debug and __LINE__ , __FILE__ « PHP Language « IT news, forums, messages
Re: debug and __LINE__ , __FILE__

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>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация