HI,
I'm searching for a way to save an xml tree made in flash mx
to the server. I use this example code in flash:
PHP Code:
test = new XML()
treeData = test.createElement("TEST")
treeData.attributes.BLABLA = "BLABLA"
test.appendChild(treeData);
but.onPress = function(){
test.send("upload.php","_blank")
}
it works fine, but my php-script won't write the data into the file
I use this php script
PHP Code:
<?
$filename = "test.xml";
$tree = $HTTP_RAW_POST_DATA;
$fp = fopen( $filename,"w+");
fwrite ( $fp, $tree );
fclose( $fp );
?>
can somebody tell me why the $HTTP_RAW_POST_DATA isn't filled in. It doesn't reseave(?) the xml tree from flash. Is there an other way do to this?
I also tried using the LoadVars object in Flash to send the tree and the $_POST array to recieve in php. The xml-tree that is saved is unvalid . It looks like this:
<TEST BLABLA=\"BLABLA\" />
thx,
P-Sch1ft