PHP cURL error 60: SSL certificate problem: unable to get local issuer certificate的解决

PHP

参考问题解决方案*3
查找资料:
To use a certificate with PHP’s cURL functions, you can download the cacert.pem certificate bundle from the official cURL website. Once you have downloaded the cacert.pem file, you should move it to whatever directory makes the most sense for you and your setup.
Then, you can simply tell cURL where your certificate bundle is located by using the curl_setopt function:
翻译一下就是SSL的问题,需要去官网下一个证书,并修改php.ini的配置文件,即可。
官网在这里 官网,进去点击下载即可。
将文件保存在本地某个位置(我放在php的安装目录下了)
然后打开php.ini文件,在最后添加如下行:

curl.cainfo="你的path\cacert.pem" 
openssl.cafile="你的路径\cacert.pem"

Adding the cert to your php.ini file.
If you don’t like the thought of having to specify the location of the certificate bundle in your PHP code, then you can add it’s path information to your php.ini file like so:

Once you add the above lines to your php.ini file, make sure that you reload the web server / PHP process so that the changes take effect.

你可能感兴趣的:(php,ssl,开发语言)