$postUrl = $url;
$curlPost = $param;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $postUrl);
$headerArray = array("Content-Type:text/xml", "charset=utf-8","Cache-Control: no-cache");
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
curl_setopt($ch, CURLOPT_SSLCERTTYPE,'PEM');
curl_setopt($ch, CURLOPT_SSLCERT,IA_ROOT . "/路径/" . 'apiclient_cert_' . $_W['uniacid'] . '.pem');
curl_setopt($ch, CURLOPT_SSLKEYTYPE,'PEM');
curl_setopt($ch, CURLOPT_SSLKEY, IA_ROOT . "/路径/" . 'apiclient_key_' . $_W['uniacid'] . '.pem');
$data = curl_exec($ch);
if($data)
{
curl_close($ch);
return $data;
}
else{
$error_msg = curl_error($ch);
$error = curl_errno($ch);
curl_close($ch);
message("打款失败,CURL出错,错误码:".$error.",错误信息:<br />$error_msg");exit;
}
证书文件路径没有问题,证书和密钥内容也是正常的,此前用以前的证书密钥测试正常报错证书错误。不会说不能加载证书,到底问题出在哪儿呢