소스 검색

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

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