Browse Source

Merge https://github.com/karsonzhang/fastadmin

Karson 7 years ago
parent
commit
7ae79daead
2 changed files with 3 additions and 6 deletions
  1. 2 5
      application/common/behavior/Common.php
  2. 1 1
      application/config.php

+ 2 - 5
application/common/behavior/Common.php

@@ -30,11 +30,8 @@ class Common
         {
         {
             // 如果是调试模式将version置为当前的时间戳可避免缓存
             // 如果是调试模式将version置为当前的时间戳可避免缓存
             Config::set('site.version', time());
             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
         // 如果是trace模式且Ajax的情况下关闭trace
         if (Config::get('app_trace') && $request->isAjax())
         if (Config::get('app_trace') && $request->isAjax())

+ 1 - 1
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'          => '你所浏览的页面暂时无法访问',
     'error_message'          => '你所浏览的页面暂时无法访问',
     // 显示错误信息
     // 显示错误信息