Re: Catching any error with PEAR MDB2

From: Date: Sat, 23 Dec 2006 13:47:06 +0000
Subject: Re: Catching any error with PEAR MDB2
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26186@lists.php.net to get a copy of this message
rav k wrote:
What I would like to do is add some code to my website so that if there is any error at all I can bring up a standard error page and display the error message there. Can you point me to any good tutorials where I can see working examples or explain how this should work?? I really want to be able to add the code to my 'config.php' file and it will work for every page thereon.
google is your friend ;-) http://www.onlamp.com/pub/a/php/2001/07/19/pear.html http://ludo.qix.it/archive/2003/08/PHP_php101_errorhandling.html http://devzone.zend.com/node/view/id/1303 http://pear.php.net/manual/en/html/core.pear.pear.seterrorhandling.html you probably are interested in these two functions: ==================================== set_error_handler("my_handle_error"); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'my_handle_error'); ==================================== HTH -- Lorenzo Alberton http://pear.php.net/user/quipo ___________________________________________________________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di più. ADSL, Hardware & Software Online Store

« previous php.pear.general (#26186) next »