Problem: I recieve XML from my flash document, and I write it to the XML document that works fine but I am having troubles keeping a root XML tag.
Here is my code.
Question: should I parse the document and write after the tag I want? and if so how do I go about doing that…
Thank you.
<?php
$filename = "xml/messages.xml";
$raw_xml = file_get_contents("php://input");
print $raw_xml."
";
urldecode($raw_xml);
$fp = fopen($filename, "a+");
fwrite($fp, $raw_xml);
fclose($fp);
?>