2
以下代码始终回显false。我错过了什么吗?curl始终返回false
$url = "https://www.google.nl/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if(curl_exec($ch)) {
echo "true";
}else{
echo "false";
}
的[读SSL页面CURL(PHP)]可能重复(http://stackoverflow.com/questions/521418/reading-ssl-page-with-curl-php) –
'回声卷曲错误:'。 curl_error($ ch);'在这种情况下调试可能很有用。 –