Composer is a dependency management tool (not a package manager) for PHP. It allows you to declare the code base on which the project depends, and it installs them for you in your project.
Methods for installing under Windows one: using the Setup program
This is the simplest way to install Composer on your machine.
Download and run Composer-setup.exe, which installs the latest version of Composer and sets up the environment variables for the system, so you can use commands directly in any directory composer
.
Method Two: PHP command installation
1. cmd into the command prompt, enter the installation directory
My installation directory is in (D:\composer),
2. Download Composer.phar
Input command: Php-r "ReadFile (' Https://getcomposer.org/installer ');" | Php
Note:
1) If the following error occurs, you need to set the environment variable (environment variable directory to the Php.exe directory) for PHP so that the global can access
2) If you receive a ReadFile error, please use the http
link or turn it on in php.ini Php_openssl.dll
3. Create a new file in the Composer.phar sibling directory Composer.bat
Enter the command echo @php "%~dp0composer.phar" %*>composer.bat
:
4. Close the current command-line window and open a new command-line window to test
Input command: composer-v
Note:
If the composer does not configure the environment variable, it can only run under the installation directory, otherwise it will report the following error;
Restart the computer if the environment variable is configured and the command still reports the following error in the new command-line window;
This manual installation is complete.
Composer Other installation details please refer to: http://docs.phpcomposer.com/00-intro.html
Windows installation composer