$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL,'http://192.168.247.138:8181/a2.php'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
$data = curl_exec($ch); 
var_dump($data);
curl_close($ch); 

解决方案 »

  1.   

    看到这么一篇文章,但是不知道该如何设置,请大家指点。 
    "苦闷中,想起nginx的一个参数proxy_buffering,它的含义是:nginx不是立即转发收到的请求,而是等buffer满之后再转发。默认是on。把它改成off,使用curl请求nginx抓取xuri就行了,数据是完整的,没有超时。"
    http://gcoder.diandian.com/post/2011-05-19/17355206
      

  2.   

    不知道是否是这个问题,请问我该如何测试: http://www.ioutlier.com/nginx-proxy-buffer-works/