PDA

View Full Version : the xml.send() doesn't trigger anything?


roievil
06-27-2005, 03:49 PM
here is the following code in my swf :

function sauverXml(objetXml) {
objetXml.send(PATH_ROOT + "saveXml.php" ,_blank);
trace ("xml sauve") ;
}

the path has been double checked, here is the saveXml.php file :

<?php
// le code PHP ---------
echo "TestPhp\n" ;
$fp=fopen("test.xml","r+");
fwrite($fp,$HTTP_RAW_POST_DATA);
//$donnees = fgets($fp);
fclose($fp);
echo "Done saving :".$donnees;
?>

When I action the function sauverXml, nothing happens, I thought that it would send the xml object to the php page and load that page in a new browser window... but no and no file is modified or created. Did I forget something along the way?

when I use getUrl(PATH_ROOT + "saveXml.php" ,_blank) It works : the page is loaded in a new browser window and the php code echoes "testPhp Done saving :"

Thank You,

Olivier