为什么500错误详情总是让人一头雾水?

2026-04-05 06:289阅读0评论SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计116个文字,预计阅读时间需要1分钟。

为什么500错误详情总是让人一头雾水?

`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 '致命错误:'; } }`

为什么500错误详情总是让人一头雾水?

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 !'); }

本文共计116个文字,预计阅读时间需要1分钟。

为什么500错误详情总是让人一头雾水?

`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 '致命错误:'; } }`

为什么500错误详情总是让人一头雾水?

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 !'); }