curl post传参非数组不能接收啊

$post_data = "13";
$url="http://mytp.com:801/Home/Index/getcurl";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($c, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 0);

curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 60);

$buf = curl_exec($c);
print_r(curl_error($c));
curl_close($c);

这样得不到,不知道啥原因

posted @ 2014-11-25 09:36  Forward1990  阅读(519)  评论(0编辑  收藏  举报