报错信息
Warning: require(): open_basedir restriction in effect. File(/work/tp6/vendor/autoload.php) is not within the allowed path(s): (/work/tp6/public/:/tmp/) in /work/tp6/public/index.php on line 15
Warning: require(/work/tp6/vendor/autoload.php): failed to open stream: Operation not permitted in /work/tp6/public/index.php on line 15
Fatal error: require(): Failed opening required '/work/tp6/public/../vendor/autoload.php' (include_path='.:') in /work/tp6/public/index.php on line 15
查看问题描述以及资料,发现是php open_basedir 配置的问题,PHP不能引入其授权目录上级及其以上的文件;
一般情况下是不会出现这种问题的,之所以出现这个问题绝大多数情况是由于服务器的原因,为了安全才做了这样的限制!
若是的入口文件切换到public下,则修改下面的文件要去掉 public
解决方式: