必须用curlopt_postfields传xml字符串作请求体,并设curlopt_postfieldsize;content-type须为application/xml;确保utf-8编码;用curlopt_httpheader添加请求头;调试开curlopt_verbose。

curl_easy_setopt 传 XML 数据必须用 CURLOPT_POSTFIELDS
POST XML 不是拼 URL 参数,得把整个 XML 字符串当请求体发出去。常见错误是误用 CURLOPT_URL 拼接 XML、或用 CURLOPT_POST 单独设为 1L 却没给数据——这样发的是空 body,服务端收不到 XML。