Open the command prompt and enter composer --version Check the composer version to confirm whether the command can be executed.
Execute composer config -g repo.packagist composer https://packagist.phpcomposer.com in the command prompt and rewrite the Packagist mirror to the domestic mirror to speed up downloading.
There are pictures and there is truth, we can’t just make guesses
There may be something wrong with the json format, please check it carefully
Install manually:
DownloadPHP(Address:
http://windows.php.net/download
),配置好php.ini
and add the PHP directory to the system environment variable PATHDownload composer.phar(Address:
https://getcomposer.org/composer.phar
),将文件放进PHP目录下,并且新建文本文件composer.cmd
,内容:@php "%~dp0composer.phar" %*
.Open the command prompt and enter
composer --version
Check the composer version to confirm whether the command can be executed.Execute
composer config -g repo.packagist composer https://packagist.phpcomposer.com
in the command prompt and rewrite the Packagist mirror to the domestic mirror to speed up downloading.Enjoy Yourself!
EOF -
Domestic mirror