404页面
当关闭网站错误之后,会默认启用404页面,404模板可以通过这个参数 "error_template"
指定。
/**
"display_errors" => false,
* 该项仅在(display_errors = false)条件下有效
* 页面错误模板(404页面)
*/
"error_template" => APP_PATH . "common/404/index.php",
我们可以在项目中通过内置辅助函数notFound()
来调用这个404页面
if(...) {
} else {
notFound();
}
附框架内置404模板效果图,不喜欢的可以将模板文件换了。
模板路径application/common/404