Unable to get local issuer certificate using CURL
问题 I'm getting the following error when call the CURL with https url: "SSL certificate problem: unable to get local issuer certificate" $ch = curl_init($sendurl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) .'/cert/uat.abc.pem'); echo $result = curl_exec($ch); echo curl_error($ch); Does anyone know how to set it up? 回答1: I think you can set CURLOPT_SSLCERT option to fix it,or use curl_setopt(