抛出异常改404

在config中添加

'http_exception_template' => [
        // 定义404错误的重定向页面地址
        404 => APP_PATH.'404.html',
        // 还可以定义其它的HTTP status
        401 => APP_PATH.'401.html',
    ],

404页面 放在 application 目录下

posted @ 2018-09-19 10:56  冷空气的清晰  阅读(332)  评论(0编辑  收藏  举报