【ThinkPHP】Fatal error: Uncaught think\exception\ErrorException: include(): Filename cannot be empty.

ThinkPHP 5.1框架报错记录

Fatal error: Uncaught think\exception\ErrorException: include(): Filename cannot be empty in /www/wwwroot/abc.com/framework/library/think/exception/Handle.php:184 Stack trace: #0 /www/wwwroot/abc.com/framework/library/think/exception/Handle.php(184): think\Error::appError(2, 'include(): File...', '/www/wwwroot/yc...', 184, Array) #1 /www/wwwroot/abc.com/framework/library/think/exception/Handle.php(184): include() #2 /www/wwwroot/abc.com/framework/library/think/exception/Handle.php(97): think\exception\Handle->convertExceptionToResponse(Object(think\exception\ErrorException)) #3 /www/wwwroot/abc.com/framework/library/think/Error.php(56): think\exception\Handle->render(Object(think\exception\ErrorException)) #4 /www/wwwroot/abc.com/framework/library/think/Error.php(90): think\Error::appException(Object(think\exception\ErrorException)) #5 [internal function]: think\Error::appShutdown() #6 {main} thrown in /www/wwwroot/abc.com/framework/library/think/exception/Handle.php on line 184

可能的情况

程序中使用了.env用作参数配置,且配置项中出现特殊字符,且没有使用双引号引入。如下图:

在这里插入图片描述
如果上面的双引号去掉就会报上面的错。

你可能感兴趣的:(PHP,tp5.1,ErrorException,.env)