Re: Making code execute on fatal error?

From: Date: Sat, 08 Jun 2002 17:17:05 +0000
Subject: Re: Making code execute on fatal error?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-101289@lists.php.net to get a copy of this message
Thanks. I am trying, but it refuses to work. Can you help? My code is: function error_handler ($code, $str) {
if(($errno == FATAL) && (    error_reporting() != 0)){
//include the error file exit; } } set_error_handler("error_handler"); //set_error_handler returns false. When I test it, the default error is displayed. Dan Hardiker wrote:
I want to make all fatal errors trigger an error file to be include, the file to exit, and the error never t be displayed. Is there any way to do this without access to php.ini?
Implement your own error handler. There is a load of documentation in the manual.


« previous php.general (#101289) next »