I am relatively new to PHP and need some minor assistance. I am passing from Flash to PHP an XML object which I only need PHP to save on the server. The XML file that is being saved is close to correct but has some extraneous characters inserted (" \ "). I am guessing I need to escape or parse them, but not really sure. Here is my PHP code:
<?php $filename = "images.xml"; $receivedData = $_POST['xmlData']; $fp = fopen($filename, "w"); fwrite($fp, $receivedData); fclose($fp); ?>
Here is the a sample of the XML that is saved on the server:
<images> <album description=\"Description of New Album\" title=\"New Album\" lgPath=\"/\" tnPath=\"gallery//\" tn=\"gallery/sample_tn.jpg\"> <img title=\"Title Here\" imgName=\"sample.jpg\" /> </album> </images>
Any help is greatly appreciated. Thanks for any and all replies.