为了从我正在做的网络服务中接收信息:
$url = "http://webserviceurl.com/index.php?param1=1¶m2=2";
//url tested, it's returning data when pasted in a browser
$c = curl_init($url);
curl_setopt($c, CURLOPT_TIMEOUT, 5);
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$info = curl_exec($c);
curl_close($c);
echo $info ;
phpinfo()表示已启用curl
但当我期待通过网址中的参数向网络服务询问的信息时,$ info返回FALSE
有人可以,给我一个错误的线索吗?
谢谢!