有什么方法可以设置 cURL 以使用<
and<
而不是<
and发送此 XML>
$xml_data = '
<Shipping_Address>
<Province>BC</Province>
<Country>Canada</Country>
<PostalCode>V6P 5T2</PostalCode>
<Phone>604-561-7977</Phone>
</Shipping_Address>';
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml','charset=ISO-8859-1'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
var_dump($output);