首页 » Web前端 » phpcurlerror6技巧_php cURL error 60缺点的解决方法

phpcurlerror6技巧_php cURL error 60缺点的解决方法

访客 2024-11-21 0

扫一扫用手机浏览

文章目录 [+]

缺点代码

cURL error 60: SSL certificate problem: unable to get local issuer certificate

接管缺点输出后,可能如下显示

cURL error 60 缺点curl code ERROR 60缺点缺点缘故原由:

curl 配置中开启了证书校验

便是利用了以下配置

phpcurlerror6技巧_php cURL error 60缺点的解决方法

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);办理方法:

方法1:

phpcurlerror6技巧_php cURL error 60缺点的解决方法
(图片来自网络侵删)

curl 关闭证书校验curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

方法2:

利用 cacert.pem

下载地址:

https://curl.haxx.se/ca/cacert.pem

在php的php.ini配置文件引用此文件

例,代码:

curl.cainfo = \公众D:\php\cacert.pem\公众

标签:

相关文章