更新post细节

This commit is contained in:
yaooo 2023-11-17 09:34:22 +08:00
parent 8d757335e3
commit c24910342a
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ function curl_post($url,$data,$headers=[]) {
//设置为post方式请求 //设置为post方式请求
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POST, 1);
//添加参数 //添加参数
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
//设置header //设置header
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//关闭请求资源 //关闭请求资源