在PHP中开启了错误显示以后,发现错误:
Fatal error: Uncaught think\exception\ErrorException: include(): Filename cannot be empty in /www/wwwroot/tp.cn/thinkphp/library/think/exception/Handle.php:184 Stack trace: #0 /www/wwwroot/tp.cn/thinkphp/library/think/exception/Handle.php(184): think\Error::appError(2, 'include(): File...', '/www/wwwroot/tp...', 184, Array) #1 /www/wwwroot/tp.cn/thinkphp/library/think/exception/Handle.php(184): include() #2 /www/wwwroot/tp.cn/thinkphp/library/think/exception/Handle.php(97): think\exception\Handle->convertExceptionToResponse(Object(think\exception\ErrorException)) #3 /www/wwwroot/tp.cn/thinkphp/library/think/Error.php(56): think\exception\Handle->render(Object(think\exception\ErrorException)) #4 /www/wwwroot/tp.cn/thinkphp/library/think/Error.php(90): think\Error::appException(Object(think\exception\ErrorException)) #5 [internal function]: think\Error::appShutdown() #6 {main} thrown in /www/wwwroot/tp.cn/thinkphp/library/think/exception/Handle.php on line 184然后看了下 Handle.php 文件的 184 行,在上面加了一句:var_dump(Container::get('app')->config('exception_tmpl'));可是显示的数据却是:NULL等于说是根本没有获取到模板文件啊,奇怪了!
最佳答案