I have an XML object i need to send from Flex to php so that php can write it to a file. I am trying to send it using HTTPService:
And my getXML.php looks like this:Code:<mx:HTTPService id="sendXML" url="http://localhost/php/getXML.php" contentType="application/xml" useProxy="false" method="POST"> </mx:HTTPService>
After i do :PHP Code:<?php
$raw_xml = file_get_contents("php://input");
$myFile = "testFile.xml";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $raw_xml);
fclose($fh);
?>
I get the empty 'testFile.xml' file so i am obviously doing something wrong but can't figure it out what excatlyCode:sendXML.request = inputXML; //inputXML is my XML object i am trying to send sendXML.send();Can someone please help me with this?
thanks in advance




Can someone please help me with this?
Reply With Quote