ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
安装composer 的时候可能遇到这样的报错: php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" PHP Warning: failed loading cafile stream: `C:\xwy\phpstudy_pro\Extensions\php\cert.pem' in Command line code on line 1 Warning: failed loading cafile stream: `C:\xwy\phpstudy_pro\Extensions\php\cert.pem' 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://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1 Warning: copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1 需要下载该文件 http://curl.haxx.se/ca/cacert.pem cacert.pem 的文件放在某一个地方,要引入到php.ini 下载下来之后,找到你对应的php.ini 文件放这个路径,记得打开签前面的分号 openssl.cafile=C:\xwy\phpstudy_pro\Extensions\php\cacert.pem ![](https://img.kancloud.cn/76/77/7677be1f1eb209c5f31cb74215143ed8_636x317.png) 然后重启phpstudy 就行了