From 4f466551e2f94e56b672872b49f9041fd5f6086d Mon Sep 17 00:00:00 2001 From: Karson Date: Fri, 7 Jul 2023 15:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E6=A8=A1=E6=9D=BF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 4845b0807790ee4c37854da8054bb4488306be3b) --- application/admin/command/Install/fastadmin.sql | 2 +- application/common/view/tpl/404.tpl | 1 + application/config.php | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 application/common/view/tpl/404.tpl diff --git a/application/admin/command/Install/fastadmin.sql b/application/admin/command/Install/fastadmin.sql index 85780dfc..e02855c5 100755 --- a/application/admin/command/Install/fastadmin.sql +++ b/application/admin/command/Install/fastadmin.sql @@ -423,7 +423,7 @@ CREATE TABLE `fa_test` ( -- Records of fa_test -- ---------------------------- BEGIN; -INSERT INTO `fa_test` VALUES (1, 1, 1, 12, '12,13', '互联网,计算机', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '

我是测试内容

', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '广西壮族自治区/百色市/平果县', '{\"a\":\"1\",\"b\":\"2\"}', '[{\"title\":\"标题一\",\"intro\":\"介绍一\",\"author\":\"小明\",\"age\":\"21\"}]', 0.00, 0, '2020-10-01 00:00:00 - 2021-10-31 23:59:59', '2017-07-10', '2017-07-10 18:24:45', 2017, '18:24:45', 1491635035, 1491635035, 1491635035, NULL, 0, 1, 'normal', '1'); +INSERT INTO `fa_test` VALUES (1, 1, 1, 12, '12,13', '互联网,计算机', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '

我是测试内容

', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '我是一篇测试文章描述,内容过多时将自动隐藏', '广西壮族自治区/百色市/平果县', '{\"a\":\"1\",\"b\":\"2\"}', '[{\"title\":\"标题一\",\"intro\":\"介绍一\",\"author\":\"小明\",\"age\":\"21\"}]', 0.00, 0, '2020-10-01 00:00:00 - 2021-10-31 23:59:59', '2017-07-10', '2017-07-10 18:24:45', 2017, '18:24:45', 1491635035, 1491635035, 1491635035, NULL, 0, 1, 'normal', '1'); COMMIT; -- ---------------------------- diff --git a/application/common/view/tpl/404.tpl b/application/common/view/tpl/404.tpl new file mode 100644 index 00000000..4c63785e --- /dev/null +++ b/application/common/view/tpl/404.tpl @@ -0,0 +1 @@ +页面未找到 \ No newline at end of file diff --git a/application/config.php b/application/config.php index 4d10da0a..5e46d95e 100755 --- a/application/config.php +++ b/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' => '你所浏览的页面暂时无法访问', // 显示错误信息