当使用curl传递post数据时 , 数据的字段如果是个数组,就会报错Array to string conversion

在调用curl_setopt_array($curl, $options);

调用curl_setopt($ch, CURLOPT_POSTFIELDS, $data)

这两处地方都可能会报错 , 解决办法是把数据数组处理一下

http_build_query($data)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2021-10-06
  • 2021-05-26
  • 2021-06-20
  • 2021-07-07
相关资源
相似解决方案