From 7ae06f0a64a6513be8b65160aa28d7fdd84a04e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=90=E5=B0=8F=E5=BF=83?= Date: Sun, 20 Aug 2017 01:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BC=82=E5=B8=B8=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E9=85=8D=E7=BD=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/behavior/Common.php | 7 ++----- application/config.php | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/application/common/behavior/Common.php b/application/common/behavior/Common.php index 76e49f8d..16f3040a 100644 --- a/application/common/behavior/Common.php +++ b/application/common/behavior/Common.php @@ -30,11 +30,8 @@ class Common { // 如果是调试模式将version置为当前的时间戳可避免缓存 Config::set('site.version', time()); - } - else - { - // 如果是开发模式修改异常页的模板 - Config::set('exception_tmpl', APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl'); + // 如果是开发模式那么将异常模板修改成官方的 + Config::set('exception_tmpl',THINK_PATH . 'tpl' . DS . 'think_exception.tpl'); } // 如果是trace模式且Ajax的情况下关闭trace if (Config::get('app_trace') && $request->isAjax()) diff --git a/application/config.php b/application/config.php index 248af5fa..6e16c574 100755 --- a/application/config.php +++ b/application/config.php @@ -144,7 +144,7 @@ return [ // | 异常及错误设置 // +---------------------------------------------------------------------- // 异常页面的模板文件 - 'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl', + 'exception_tmpl' => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl', // 错误显示信息,非调试模式有效 'error_message' => '你所浏览的页面暂时无法访问', // 显示错误信息