mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进异常页面
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
// 应用命名空间
|
||||
|
||||
@@ -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');
|
||||
// 获取并清空缓存
|
||||
|
||||
Reference in New Issue
Block a user