Composer installation tutorial at [php] Windows environment

method one:

Download Composer-Setup.exe Once installed, it will automatically search  php.exe  path, if not, then manually add the path.

 
Windows install Composer

Method Two:

If there are mistakes, indicating the great firewall is blocking the file you get there is the foreign server, you need to manually download it

 
Windows install Composer

The first step: add environment variables to php.exe

Methods: Computer -> right click -> Properties -> Advanced System Settings -> Environment Variables (this step I believe we are properly properly)

 
Windows install Composer

Copy path to php.exe pasted into the path environment variable (note preceded by a semicolon (;)), the following picture:

 
Windows install Composer

php -v   executed successfully returns the version information, here is the PHP 7.0.12

 
Windows install Composer

Step two: Open the openssl extension

Method: In PHP directory, open php.ini file, remove extension = php_openssl.dll preceding semicolon ( ; )

 
Windows install Composer

Third: Download composer.phar and put PHP directory, the new directory in the PHP composer.cmd , says:

@php "%~dp0composer.phar" %*

 
Windows install Composer

After saving, run the file, open cmd, enter the composer -V   to see if success

 
Windows install Composer

4: Changing Packagist for domestic mirror

composer config -g repo.packagist composer https://packagist.phpcomposer.com

 
Windows安装Composer




Guess you like

Origin www.cnblogs.com/landv/p/11366703.html