Re: Trapping PHP Errors
| From: | Robert Samuel White | Date: | Mon, 13 Jan 2003 22:46:11 +0000 |
| Subject: | Re: Trapping PHP Errors | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131493@lists.php.net to get a copy of this message | ||
Use the error_reporting function to define which errors you would like PHP to report to the error handler. If you want everything to be mailed to you, including warnings, use the E_ALL setting, though you may get a lot more "warnings" than you expect this way:
error_reporting(E_ALL);
function ErrorHandler($_ErrorNumber_, $_ErrorString_, $_ErrorFile_, $_ErrorLine_)
{
mail(...);
}
set_error_handler("ErrorHandler");