Install laravel after installing composer

Install composer manually

1 Configure php.exe to environment variables (you can use php commands in any directory)
write picture description here
2 Execute php -r "readfile(' http://getcomposer.org/installer ');" in the dos window | php
will be in this directory Generate composer.phar
write picture description here
3 Create a composer.bat file in this directory and write @php “%~dp0composer.phar” %*
write picture description here
4 Exit the dos window, re-enter the composer and install it successfully as shown in the figure
write picture description here

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,
write picture description here
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)
write picture description here
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
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326091248&siteId=291194637