Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在PHP Curl中发送get参数?_Php_Curl - Fatal编程技术网

如何在PHP Curl中发送get参数?

如何在PHP Curl中发送get参数?,php,curl,Php,Curl,我试图使用: $qry_str = "ft_dl={$ow_ft_dl}&ft_dl_name={$singername} - $songen ({$ow_quality[$i]}).mp3&ft_dl_cover={$src}&sn_name={$singername}&songname={$songen}"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, OW_DL_HOST_FUNC

我试图使用:

    $qry_str = "ft_dl={$ow_ft_dl}&ft_dl_name={$singername} - $songen ({$ow_quality[$i]}).mp3&ft_dl_cover={$src}&sn_name={$singername}&songname={$songen}";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, OW_DL_HOST_FUNC . '?' . $qry_str);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_exec($ch);
但是当我启动代码时,我对目标文件没有任何操作

OW_DL_HOST_FUNC文件值如下:


尝试使用CURLOPT_HTTPGET,尽管我不确定它是否符合您的目的。尝试使用CURLOPT_HTTPGET,尽管我不确定它是否符合您的目的。