更新时间:2021-12-13 22:37:16
CURL错误代码7(CURLE_COULDNT_CONNECT)
CURL error code 7 (CURLE_COULDNT_CONNECT)
非常明确...它表示主机或代理。
is very explicit ... it means Failed to connect() to host or proxy.
以下代码适用于任何系统:
The following code would work on any system:
$ch = curl_init("http://google.com"); // initialize curl handle
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
print($data);
如果您看不到google页面,则... / code>或您有一些
防火墙
或限制
问题。
If you can not see google page then .. your URL is wrong
or you have some firewall
or restriction
issue.