改进异常页面

This commit is contained in:
yunwuxin
2016-06-29 15:10:43 +08:00
parent 0aa1994ce3
commit 73fdd13482
3 changed files with 33 additions and 2 deletions

View File

@@ -349,6 +349,12 @@ class App
self::$debug = Config::get('app_debug');
if (!self::$debug) {
ini_set('display_errors', 'Off');
} else {
//重新申请一块比较大的buffer
if (ob_get_level() > 0) {
ob_end_clean();
}
ob_start();
}
// 应用命名空间

View File

@@ -155,8 +155,10 @@ class Handle
while (ob_get_level() > 1) {
ob_end_clean();
}
$data['echo'] = ob_get_clean();
ob_start();
ob_implicit_flush(0);
extract($data);
include Config::get('exception_tmpl');
// 获取并清空缓存