为什么curl语句错误导致nginx进程死掉
展开全部
"苦闷中,想起nginx的一个参数proxy_buffering,它的含义是:nginx不是立即转发收到的请求,而是等buffer满之后再转发。默认是on。把它改成off,使用curl请求nginx抓取xuri就行了,数据是完整的,没有超时。"
$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);
$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);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
$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);
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);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
例如:
location / {
trim on;
trim_js on;
trim_css on;
}
location / {
trim on;
trim_js on;
trim_css on;
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询