Install composer manually
1 Configure php.exe to environment variables (you can use php commands in any directory)
2 Execute php -r "readfile(' http://getcomposer.org/installer ');" in the dos window | php
will be in this directory Generate composer.phar
3 Create a composer.bat file in this directory and write @php “%~dp0composer.phar” %*
4 Exit the dos window, re-enter the composer and install it successfully as shown in the figure
Install laravel with composer
1. Configure the composer installation directory to the environment and variables (same as above)
2. Install the laravel installer: composer global require "laravel/installer" After success,
3. Configure the bin directory under the vendor to the environment variable and use the laravel command in any directory
. 4. Check the local Whether the environment matches the version of laravel (Tokenizer and XML extensions are already built-in and cannot be searched in php.ini under Windows)
4. Switch to the web directory and execute composer create-project –prefer-dist laravel/laravel blog 5.4.* (the time is relatively short ) long)
5 Access to the public directory is successful