Blogger Information
Blog 11
fans 0
comment 0
visits 9294
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Windows环境下Composer的安装教程
The Wolf Of Faith
Original
691 people have browsed it

1.先下载Composer-Setup.exe,下载地址:下载Composer 。会自动搜索PHP.exe的安装路径,如果没有,就手动找到php路径下的php.exe。

2.在PHP目录下,打开php.ini文件,开启openssl扩展。去掉extension=php_openssl.dll前面的分号(;)

3.把php目录添加到环境变量(和php.exe同级目录的路径)例如:D:\apache_php\php添加到环境变量path里。

4.下载composer.phar,下载地址:Composer.phar 。将composer.phar文件放入php目录下,在php目录下新建一个文件composer.cmd,内容写成:@php "%~dp0composer.phar" %*保存。运行这个文件,然后打开cmd运行:composer会出现

composer.jpg

可以运行composer --version 查看composer的版本。

5.在命令行中执行:composer config -g repo.packagist composer https://packagist.phpcomposer.com

改写Packagist 镜像至国内镜像可以加快***。

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post