Thinkphp设置仅在调试模式关闭时显示404页面

常见thinkphp设置404页面为建一个空控制器;里面然后通过_empty()再$this->display跳转到404页面;
thinkphp的配置项里面是有设置错误页面模板的:
'TMPL_EXCEPTION_FILE' => APP_DEBUG ? THINK_PATH.'Tpl/think_exception.tpl' : './Template/default/Home/Public/404.html',

Tags: thinkphp

添加新评论