Re: Error Handling question
| From: | Richard Lynch | Date: | Wed, 08 Aug 2007 01:35:47 +0000 |
| Subject: | Re: Error Handling question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260381@lists.php.net to get a copy of this message | ||
On Mon, August 6, 2007 4:41 am, debussy007 wrote:
> I am new to PHP and need some help for error handling.
>
> I read in the docs that i can handle the errors this way in my PhP:
>
> set_error_handler('errorHandler');
> function errorHandler($errnum,$errmsg,$file,$lineno){
> [...]
> }
>
> But does that mean that I have to copy paste this code in all my Php
> pages
> or is there a better way ?
Put it in an include file with all the other functions you are going
to need shortly.
http://php.net/include
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?