require(): open_basedir restriction in effect. 解决方法

require(): open_basedir restriction in effect. 解决方法

laravel访问时遇到的问题:

Warning: require(): open_basedir restriction in effect.
File(/www/***/wxsq/vendor/autoload.php) is not
within the allowed path(s):
(/www/***/wxsq/public/:/tmp/:/proc/) in
/www/***/wxsq/public/index.php on line 24

Warning:
require(/www/***/wxsq/vendor/autoload.php):
failed to open stream: Operation not permitted in
/www/***/wxsq/public/index.php on line 24

Fatal error: require(): Failed opening required
‘/www/***/wxsq/public/…/vendor/autoload.php’
(include_path=’.:/www/server/php/73/lib/php’) in
/www***/wxsq/public/index.php on line 24

如果服务器安装 了宝塔的解决办法(亲测有用)

require(): open_basedir restriction in effect. 解决方法
其他解决办法请参考:https://blog.****.net/CaiL_520914/article/details/107608441