php利用curl发起get请求时url的参数问题
天蓬老师
天蓬老师 2017-04-11 10:21:22
0
1
319

发送get请求时,url是不是不能带查询字符串,只能是域名+path呢?我的示例如下,加上查询字符串后就不好使了???

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php");
//curl_setopt($ch, CURLOPT_URL, "http://www.dest.cn/member/my.php?mid=14&my_calfee=1")
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$kk = curl_exec($ch);
curl_close($ch);
print_r($kk);
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
PHPzhong

get就是url传参

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!