问题
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 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
And these are the commands I have used:
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.
回答1:
You can recreate your project autoload by this method:
- Open your terminal,
cd /var/www/html/bookmarker
,composer dumpautoload
Give it a try.
来源:https://stackoverflow.com/questions/44106575/autoload-php-missing-from-vendor-folder-with-cakephp-3-0