Re: Number of the line ?
| From: | Micha Ober | Date: | Fri, 06 Jul 2001 08:36:55 +0000 |
| Subject: | Re: Number of the line ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-56462@lists.php.net to get a copy of this message | ||
That's easy :)
Use __LINE__ !
example:
1 <?
2 echo "Current line is: ".__LINE__;
3 ?>
--- Emmanuel FAIVRE <manu@manucorp.com> wrote:
> Hi All,
>
> i'm currently writing a debugging lib in PHP and i
> would like to find
> the number of the line in my script
>
> when i made an
>
> myfile.php
>
> 1 <?php
> 2 echo "i'm on line $NUMBER_LINE\n";
> 3 echo "i'm on line $NUMBER_LINE\n";
> 4 ?>
>
> would give :
>
> i'm on line 2
> i'm on line 3
>
> it perhaps exists because when we have warning we
> see the line number
>
> Thanks
>
>
> Manu
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
Linux...
Because it works.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/