Cakephp 3.0的供应商文件夹中缺少autoload.php [英] autoload.php missing from vendor folder with Cakephp 3.0
问题描述
我已经安装了Cakephp 3.0的新软件包,我已经按照本教程,我的系统上已经安装了新软件包,但是当我尝试运行服务器时,出现此错误:
I have installed fresh package of Cakephp 3.0, I have followed this tutorial, a fresh package has been installed on my system, but when I try to run the server then I get this error:
PHP警告:require(/var/www/html/bookmarker/vendor/autoload.php):无法打开流:在第31行的/var/www/html/bookmarker/bin/cake.php中没有这样的文件或目录
PHP Warning: require(/var/www/html/bookmarker/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/bookmarker/bin/cake.php on line 31
这些是我使用的命令:
curl -s https://getcomposer.org/installer | php
php composer.phar create-project --prefer-dist cakephp/app bookmarker
cd bookmarker/
bin/cake server
当我尝试上一条命令时,我遇到了该错误。
When I tried the last command I got that error.
推荐答案
您可以通过以下方法重新创建项目自动加载:
You can recreate your project autoload by this method:
- 打开终端,
-
cd / var / www / html / bookmarker
, -
composer dumpautoload
- Open your terminal,
cd /var/www/html/bookmarker
,composer dumpautoload
尝试一下。
这篇关于Cakephp 3.0的供应商文件夹中缺少autoload.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!