宝塔面板搭载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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容