Re: line number of error variable ??

This is a discussion on Re: line number of error variable ?? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; On Thu, 09 Dec 2004 17:48:12 -0500, Koncept <user@unknown.invalid> wrote: >I am looking ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-09-2004
Andy Hassall
 
Posts: n/a
Default Re: line number of error variable ??

On Thu, 09 Dec 2004 17:48:12 -0500, Koncept <user@unknown.invalid> wrote:

>I am looking to just print out the line number a warning occurred on.
>Is there a $LINENO or __LINE__ variable?


If you define an error handler, it gets passed this information.

http://php.net/set_error_handler

>Also is there a variable that holds the name of the current script
>being run?


There's the __FILE__ constant, or $_SERVER['PHP_SELF'], depending on whether
you want the current file taking into account included files, or the file
originally invoked by the request.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0