Display custom error page on all PHP errors and email them to administrator

manjes

New Member
Afternoon,I've been looking around for a while without success to see if there's a method to display a custom error page, whenever any PHP error arises, hiding the error from users - currently achieved by error_reporting(0), then emailing the specific error to my email address.Initial logic (I know it's not right, it's just to help you understand better):\[code\]if(error_reporting){ ob_clean(); include('classes/email.php'); $email = new email($pdo); $email->mailError(ERROR_REPORT); include('error-page.php'); die();}\[/code\]Any help would be much appreciated, thanks!
 
Back
Top