Windows system: Download Composer
A. cmd into the installation directory of PHP, example: E:\wamp\bin\php\php5.5.12, and then execute the following command to install the latest version of Composer:
php -r "copy(‘https://install.phpcomposer.com/installer‘, ‘composer-setup.php‘);"
php composer-setup.php
php -r "unlink(‘composer-setup.php‘);"
The script that executes the first command composer-setup.php
will simply detect the php.ini
parameters in the settings, give a warning if some parameters are not set correctly, and then download the latest version of the composer.phar
file to the current directory.
The functions of the above 3 commands are:
- Download the installation script-
composer-setup.php
-to the current directory.
- Perform the installation process.
- Delete the installation script.
Two. Finished downloading, now the global installation.
1. Enter the installation directory for PHP
2. Create a new file in the PHP installation directory composer.bat
and save the following code to this file.
@php "%~dp0composer.phar" %*
3. Add the PHP environment variable. Right-click My Computer-Properties-Advanced system settings-environment variables. Locate the "system variable" named path, double-click Edit, and at the end of the add semicolon and PHP directory location, such as; E:\wamp\bin\php\php5.5.12
Finally reopen a command-line window and try it out to composer --version
see if the version number is correctly printed.
Output Composer version 1.4.1 2017-03-10 09:29:45
Get!!!!!!!!!!!!!!!!!!!!!!!
Broken things composer, installation fee Saad, gas dead ME!!!!!
Windows Global Installation composer