解决宝塔面板出现Warning: require(): open_basedir restriction in effect警告

季宏言 |

错误描述:

Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/drupal/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/drupal/web/:/tmp/) in /www/wwwroot/drupal/web/autoload.php on line 16

Warning: require(/www/wwwroot/drupal/vendor/autoload.php): failed to open stream: Operation not permitted in /www/wwwroot/drupal/web/autoload.php on line 16

Fatal error: require(): Failed opening required '/www/wwwroot/drupal/web/../vendor/autoload.php' (include_path='.:/www/server/php/73/lib/php') in /www/wwwroot/drupal/web/autoload.php on line 16

 

解决办法:

进入  宝塔面板后台-网站-设置-网站目录

修改网站设置,网站目录里的防跨站攻击,取消打勾,刷新网站就正常了。

添加新评论

此字段内容将保密,不会被其他人看见。