config/app.php
// 异常页面的模板文件
'exception_tmpl' => app()->isDebug()==true ?
app()->getThinkPath() . 'tpl/think_exception.tpl' :
\think\facade\App::getAppPath() . 'error.html',
'http_exception_template' => [
// 定义404错误的模板文件地址
404 => \think\facade\App::getAppPath() . '404.html',
// 还可以定义其它的HTTP status
500 => \think\facade\App::getAppPath() . '500.html',
],