Browse Source

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

(cherry picked from commit 4845b0807790ee4c37854da8054bb4488306be3b)
Karson 1 year ago
parent
commit
4f466551e2

File diff suppressed because it is too large
+ 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',
     'default_timezone'       => 'PRC',
     // 是否开启多语言
     // 是否开启多语言
-    'lang_switch_on'         => true,
+    'lang_switch_on'         => false,
     // 默认全局过滤方法 用逗号分隔多个
     // 默认全局过滤方法 用逗号分隔多个
     'default_filter'         => '',
     'default_filter'         => '',
     // 默认语言
     // 默认语言
@@ -151,6 +151,11 @@ return [
     // +----------------------------------------------------------------------
     // +----------------------------------------------------------------------
     // 异常页面的模板文件
     // 异常页面的模板文件
     'exception_tmpl'         => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl',
     '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'          => '你所浏览的页面暂时无法访问',
     'error_message'          => '你所浏览的页面暂时无法访问',
     // 显示错误信息
     // 显示错误信息