ventor 文件夹没被提交到 GitHub 上 // 原问题(访问 sample.test 出错,sample 下没有 vendor 文件夹)?
显示找不到/vendor/autoload.php 有没有大佬给解决下
error1:Warning: require(/home/vagrant/Code/sample/public/../vendor/autoload.php): failed to open stream: No such file or directory in /home/vagrant/Code/sample/public/index.php on line 24
error2: Fatal error: require(): Failed opening required '/home/vagrant/Code/sample/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/vagrant/Code/sample/public/index.php on line 24
看来两个错误都是由于缺少autoload.php文件造成的
当我把larval文件夹下的vendor复制到sample后就成了这样
缘由是这样的:由于 yarn 安装过程中终止所以我删了原来的sample项目后,从github clone到了本地,应该是github上那份没有ventor文件夹,才导致我clone的那份没有ventor文件夹
我刚刚重新建立了一个项目,把他push到github上后看了一下,发现也没有ventor文件夹-----而我本地是存在的
不知道为什么
推荐文章: