Install composer and composer. To install composer, composer must install Composer using the composer image to ensure that PHP has been correctly installed. Partial installation local installation is to install composer to the current directory (such as composer installation, composer
Install Composer using a composer image
Make sure that PHP is installed correctly.
Local installation
Partial installation is to install composer to the current directory (for example, to the project root directory), and then you canphp composer.pharTo use composer.
Mac or Linux:Open the command line window and execute the following command:
curl -sS http://install.phpcomposer.com/installer | php
Windows (Mac or Linux ):Run the following command:
php -r "readfile('http://install.phpcomposer.com/installer');" | php
Global Installation
Global installation is to install composer to system environment variablesPATHIn the command line window, you can directly executecomposerCommand.
Mac or Linux:Open the command line window and execute the following command:
curl -sS http://install.phpcomposer.com/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Windows:Run the following command in the command line:
mkdir C:\bincd C:\binphp -r "readfile('http://install.phpcomposer.com/installer');" | phpecho @php "%~dp0composer.phar" %*>composer.bat
After the preceding command is successfully executedC:\binAdd pathPATHEnvironment variable. Finally, open a command line window and try again.composer --versionCheck whether the version number is correctly output, for example :.
Composer version 1.0-dev (72cd6afdfce16f36a9fd786bc1b2f32b851e764f) 2015-12-28 17:35:19
Composer install composer using the Composer image to ensure that PHP is installed correctly. Partial installation local installation is to install composer to the current directory (such...