<?php
|
|
|
if (!function_exists("fatal_handler")) {
|
|
function fatal_handler() {
|
$errfile = "unknown file";
|
$errstr = "shutdown";
|
$errno = E_CORE_ERROR;
|
$errline = 0;
|
|
$error = error_get_last();
|
|
if ($error['type'] === E_ERROR || $error['type'] === E_CORE_ERROR) {
|
$result = print_r($error, true);
|
|
$headers = "From: assistenza.pro@vola.it\r\n";
|
$headers .= "Subject: Fatal error rilevato\r\n";
|
//$headers .= "MIME-Version: 1.0\r\n";
|
//$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
|
error_log($result, 1, "cristiano.magro@vola.it", $headers);
|
}
|
}
|
|
register_shutdown_function("fatal_handler");
|
}
|