$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$api);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//禁止直接显示获取的内容 重要curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //$json = curl_exec($ch); //获取curl_close($ch);