Today to learn PHP when you want to install composer, just started to use the EXE file installation method, but installed several times have not been installed successfully, such as:
There may be some other errors, so here I changed a way to install, is to manually install composer, the method is as follows:
The first step:
Download file, Address: https://getcomposer.org/download/
Remember to download Phar files, such as:
This is where the downloaded files are placed in the PHP directory.
Step Two:
Create a new Composer.bat file and write the contents in it:
@ECHO OFF php "%~dp0composer.phar"%*
Then double-click Execute this file.
Step Three:
If your PHP has been configured with environment variables to skip, if not please configure the PHP directory to the environment variable
Fourth Step:
Open the cmd window input composer-v, test the installation results, if you see the installation succeeded as shown:
Win7 installing composer Failed to decode Zlib stream