Composer 使用

官网 https://getcomposer.org/

$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to ena
ble it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable i
t when you configured PHP? in Command line code on line 1
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to ena
ble it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable i
t when you configured PHP? in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: No
 such file or directory in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: No such
 file or directory in Command line code on line 1

https://stackoverflow.com/questions/292018...
vi php.ini
extension=php_openssl.dll

$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
PHP Warning:  copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
d in Command line code on line 1

Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
d in Command line code on line 1
PHP Warning:  copy(): Failed to enable crypto in Command line code on line 1

Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: op
eration failed in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: operati
on failed in Command line code on line 1
wget http://curl.haxx.se/ca/cacert.pem
vi php.ini
openssl.cafile=/usr/local/openssl/ssl/certs/cacert.pem
$ php composer-setup.php
All settings correct for using Composer
Downloading...

Composer (version 1.6.5) successfully installed to: D:\code\composer.phar
Use it: php composer.phar

php -r "unlink('composer-setup.php');"
mv composer.phar composer
./composer -V
Composer version 1.6.5 2018-05-04 11:44:59
composer config -g repo.packagist composer https://packagist.laravel-china.org
composer g require psy/psysh:@stable
本作品采用《CC 协议》,转载必须注明作者和本文链接
sushengbuhuo
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!