我將Ajax中的XML數據從Ajax發送到第一個PHP腳本。它工作正常。將XML數據從jQuery發佈到兩個PHP腳本
jQuery的 - 阿賈克斯
open('POST', 'get_and_send_XML.php', { xml: newXmlString1 }, '_blank');
get_and_send_XML.php
$data = $_POST['xml'];
$fh = fopen('first.txt', 'w') or die("Can't create file");
fwrite($fh, $data);
fclose($fh);
curl_setopt($ch, CURLOPT_URL,"http://domain.com/second.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "xml=". $data);
second.php
$data = $_POST['xml'];
$fh = fopen('second.txt', 'w') or die("Can't create file");
fwrite($fh, $data);
fclose($fh);
但後來我需要從這個第一PHP腳本發送XML數據,另一第二PHP腳本由cURL。但在第二個PHP腳本中,XML數據看起來不一樣。 Html聊天改變了。
如何解決這個問題?
你應該給我們多一點信息,至少兩個PHP腳本 –
內容請把你的代碼,這將有助於得到最佳的答案 – Sachith
呀,我們對此深感抱歉。我編輯了原文。 ;-) – Patrik