以下代码返回退出代码 58。
来自 cURL 文档:本地客户端证书的 CURLE_SSL_CERTPROBLEM (58) 问题。
// create a new CURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSLCERT, getcwd() . $CERT);
curl_setopt($ch, CURLOPT_SSLCERTPASSWD,"XXXXX");
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content Type: text/xml',
'User-Agent: XXXXX',
'User-Name: XXXXX'
));
$RESPONSE = curl_exec($ch);
var_dump($RESPONSE);
// close CURL resource, and free up system resources
curl_close($ch);
有什么我想念的吗?