PS:
1。捕获PHP语法错误
2。严重的错误

两类错误不能正常set_error_handle捕获,这是捕捉这种错误的技巧
复制代码代码如下所示:
/ / test.php页
(0)error_reporting;
register_shutdown_function('pageonshutdown);
包括('error_test。php);
PageOnShutdown()函数
{
味精= error_get_last(美元);
print_r($味精);

}

/ / error_test.php页

$ = 1 + 2

$

然后输出test.php打印
阵列({ } { } = >消息类型4 = >解析错误{文件} = D:网络 TBC error_test.php {线} = 5)
可以通过获得MSG来编写日志操作。