我根据教程,输入命令安装 composer
php composer.phar install
但是却提示我错误
You must enable the openssl extension to download files via https
但是我查看了我的 php.ini 设置,ssl确实开启了
extension=php_openssl.dll
查看这个 issues:https://github.com/composer/composer/issues/1440
WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI. You need to modify C:\wamp\bin\php\php-X.Y.Z\php.ini to enable it for the CLI.
Composer 使用的是 CLI 模式的 PHP,而 Web 服务器调用的 PHP 进程有可能使用了不同的 php.ini 配置。
justjavac Composer 使用的是 CLI 模式的 PHP,而 Web 服务器调用的 PHP 进程有可能使用了不同的 php.ini 配置。
果然是这个问题,太坑了吧