您好,欢迎访问一九零五行业门户网

php利用curl发起get请求时url的参数问题

php利用curl发起get请求时url的参数问题:发送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);
回复内容:发送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);
get就是url传参
以上就是php利用curl发起get请求时url的参数问题的内容。
相关文章:
php中的使用curl发送请求(get请求和post请求)
php使用curl函数发送post请求的注意事项实例详解
php开发技巧(八)-curl请求的代码详情
其它类似信息

推荐信息