?按照提示前往libcurl - Error Codes說是SSL 證書問題
?解決方法:
1.前往該路徑
下載https://curl.se/ca/cacert.pem? 將文件里的內(nèi)容全部復制下來,然后替換上圖路徑的/ca-bundle.crt
? 里面的內(nèi)容保存即可
若行不通可以嘗試第二種方法文章來源:http://www.zghlxwxcb.cn/news/detail-524431.html
2.在執(zhí)行curl操作前在前面加上如下代碼文章來源地址http://www.zghlxwxcb.cn/news/detail-524431.html
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://test.com/");
curl_setopt($ch, CURLOPT_HEADER, false);
//原本的代碼段
// ...
// ...
// ...
curl_close($ch);
到了這里,關于解決cURL error 60: SSL: no alternative certificate subject name matches target host name ‘test.com‘的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!