简体   繁体   中英

How do I fix Laravel Composer autoload_classmap Error

I've downloaded our copy of a Laravel project to my local computer. I'm running XAMP 3.2.2, PHP 5.6.19. I've installed Composer and updated the database configuration.

But as I run the project, localhost/AAAAA (AAAAA is the folder of the Laravel project), I get the error below:

Parse error: syntax error, unexpected '' => $vendorDir . '' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\AAAAA\vendor\composer\autoload_classmap.php on line 1621

How do I fix the problem?

Thanks

You could try regenerating the composer autoload files:

php composer.phar dump-autoload

Since you just downloaded the project, you'd likely need to initiate an install first which should do this for you:

php composer.phar install

The install command will install all project dependencies into vendor/ and dump the autoload files. The package information is stored in composer.json & composer.lock.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM