curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));

from-data数据的为:
​​​​​​$data = [
'name' => 'aaa',
'sex' => 1
];

x-www-form-urlencoded时的数据则要变为  http_build_query($data);

相关文章:

  • 2021-12-05
  • 2022-02-27
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
相关资源
相似解决方案