浏览代码

新增自定义错误码模板配置

Karson 1 年之前
父节点
当前提交
4845b08077
共有 3 个文件被更改,包括 8 次插入2 次删除
  1. 1 1
      application/admin/command/Install/fastadmin.sql
  2. 1 0
      application/common/view/tpl/404.tpl
  3. 6 1
      application/config.php

文件差异内容过多而无法显示
+ 1 - 1
application/admin/command/Install/fastadmin.sql


+ 1 - 0
application/common/view/tpl/404.tpl

@@ -0,0 +1 @@
+页面未找到

+ 6 - 1
application/config.php

@@ -42,7 +42,7 @@ return [
     // 默认时区
     'default_timezone'       => 'PRC',
     // 是否开启多语言
-    'lang_switch_on'         => true,
+    'lang_switch_on'         => false,
     // 默认全局过滤方法 用逗号分隔多个
     'default_filter'         => '',
     // 默认语言
@@ -151,6 +151,11 @@ return [
     // +----------------------------------------------------------------------
     // 异常页面的模板文件
     'exception_tmpl'         => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl',
+    // 自定义错误码模板
+    'http_exception_template'    =>  [
+        // 定义404错误的模板渲染
+        // 404 =>  APP_PATH . 'common/view/tpl/404.tpl',
+    ],
     // 错误显示信息,非调试模式有效
     'error_message'          => '你所浏览的页面暂时无法访问',
     // 显示错误信息