Here what I want to do:
I want to modify an existing xml file (membres.xml) starting from flash by using sendAndLoad() and while passing by a php file. I control rather well flash, I know xml better and better but I know the php still little. My progamming is partly inspired from this tutorial:
http://www.kirupa.com/web/xml/examples/simpleeditor.htm
But something still does not function… This is why I need your assistance. All seems to function, but my xml file (membres.xml) remains unchanged.
Flash:
In flash, after having loaded and having modified the file membres.xml, I use sendAndLoad to send my xml object to the php file:
reload_xml.sendAndLoad(“envoiexml.php”, membres_xml);
a trace of the xml object did right before sendAndLoad shows that the xml object reload_xml was modified correctly. The error must thus logically be further
PHP:
Here now the php code in the file envoiexml.php:
<?php
$filename = “membres.xml”;
$raw_xml = file_get_contents(“php://input”);
print $raw_xml;
$fp = fopen($filename, “w”);
fwrite($fp, $raw_xml);
fclose($fp);
?>
I only know a little in php. It is an integral copied/pasted script provided in the tutorial mentioned above. I did nothing but change the name of the xml file… But when then I check the xml document, it is always empty:
< membres ></membres >
Your assistance would be strongly appreciated! Thank you in advance! :thumb: