宝塔面板搭载ThinkPHP5.0项目关于open_basedir报错解决办法


`Warning: ``require``(): open_basedir restriction in effect. File(/www/wwwroot/www.xxx.cn/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/www.xxx.cn/``public``/:/tmp/:/proc/) in /www/wwwroot/www.xxx.cn/``public``/index.php on line 17`

`Warning: ``require``(/www/wwwroot/www.xxx.cn/thinkphp/start.php): failed to open stream: Operation not permitted in /www/wwwroot/www.xxx.cn/``public``/index.php on line 17`

`Fatal error: ``require``(): Failed opening required ``'/www/wwwroot/www.xxx.cn/public/../thinkphp/start.php'` `(include_path=``'.:/www/server/php/56/lib/php'``) in /www/wwwroot/www.xxx.cn/``public``/index.php on line 17`

解决办法:

在网站设置里把‘防跨站攻击’勾选去掉:

image.png

然后到软件管理——找到所安装的PHP——设置——重启即可:

image.png

以上解决方法参考:http://www.xiaoerhu.com/content/detail272.html

你可能感兴趣的:(宝塔面板搭载ThinkPHP5.0项目关于open_basedir报错解决办法)