-
Saving XML to Disk
In AS3 I have a swf that talks to a PHP file. That PHP should take a passed variable from Flash in this case an XML object, and save that to disk.
This is my PHP script tell me where I went wrong:
Code:
<?php
$xmlstr = $HTTP_POST_VARS['xmldoc'];
$action = $HTTP_POST_VARS['action'];
if ($action == "send") {
$default_dir = "NEW_BLAH.xml";
$fp = fopen($default_dir,'w');
$write = fwrite($fp,$xmlstr);
$flcose = fclose($fp);
//$test = $dom->save("C:/new_config.xml");
echo "XML Saved";
}
?>
-
Hi,
so in your flash code you have a loadvars object, and set its xmldoc member to that xml object?
Musicman
-
Yeah except in AS3 LoadVars doesn't exist anymore. It's now URLVariables URLRequest and URLLoader classes. But some basic idea. Let's just assume that PHP does pick up that variable which is an XML Object, what do I do from there?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|