感谢广洲同学。
文件:source/class/class_core.php
修改 handleException 函数,改成:
public static function handleException($exception) {
if(DISCUZ_CORE_DEBUG){
discuz_error::exception_error($exception);
} else {
discuz_error::simple_show_error();
}
}
文件:source/class/discuz/discuz_error.php
在最后面(write_error_log函数的下方)增加:
public static function simple_show_error(){
echo <<<EOT
<!DOCTYPE html>
<html>
<head>
<title>出错了</title>
<style>
body {
background: #F1F2F6;
}
#container {
margin: 100px auto;
text-align: center;
}
h1 {
font-weight: normal;
font-size: 28px;
}
</style>
</head>
<body>
<div id="container">
<img src="static/image/extend/error.png" width="200" height="200">
<h1>出错了!</h1>
</div>
</body>
</html>
EOT;
}
发表评论