首页 > 代码库 > curl post传参非数组不能接收啊

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

$post_data = "http://www.mamicode.com/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);

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

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