美文网首页
500错误 详情打印

500错误 详情打印

作者: 永远love爱 | 来源:发表于2016-11-26 15:20 被阅读0次
error_reporting(E_ALL);
function cache_shutdown_error() {
 
    $_error = error_get_last();
 
    if ($_error && in_array($_error['type'], array(1, 4, 16, 64, 256, 4096, E_ALL))) {
 
        echo '<font color=red>你的代码出错了:</font></br>';
        echo '致命错误:' . $_error['message'] . '</br>';
        echo '文件:' . $_error['file'] . '</br>';
        echo '在第' . $_error['line'] . '行</br>';
    }
}
 
register_shutdown_function("cache_shutdown_error");
// 检测PHP环境
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    die('require PHP > 5.3.0 !');
}

相关文章

网友评论

      本文标题:500错误 详情打印

      本文链接:https://www.haomeiwen.com/subject/yjhgpttx.html