我正在尝试使用包含一些 XML 的 curl 向服务器发出 POST 请求,但我收到错误“请求实体太长”有人能指出我做错了什么吗?谢谢!:)
$url = 'http://web1.trueship.com/readyreturns/company/api.php/orders?key=xxxxxxxxxxxxxxxxxx&overwrite=true';
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, Array("&xml=".$encodedXml));
curl_setopt ($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, TRUE);
$result = curl_exec ($curl);
curl_close ($curl);
print $result;