更新post细节
This commit is contained in:
parent
8d757335e3
commit
c24910342a
|
@ -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);
|
||||||
//关闭请求资源
|
//关闭请求资源
|
||||||
|
|
Loading…
Reference in New Issue