hello.
i used a kirupa tutorial to save an xml file.
AS:
[COLOR=#006610]var[/COLOR] [COLOR=#000050]xml_file[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#666666]“xmlFileName.xml”[/COLOR];
[COLOR=#006610]var[/COLOR] [COLOR=#000050]server_file[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#666666]“phpFileName.php”[/COLOR];
[COLOR=#000050]my_Xml[/COLOR].[COLOR=#0000d0]sendAndLoad[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]server_file[/COLOR], [COLOR=#000050]xml_file[/COLOR][COLOR=#0000ff])[/COLOR];
PHP:
[COLOR=#991010]<?php[/COLOR] [COLOR=#000050]$filename[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#666666]“xmlFileName.xml”[/COLOR]; ******************
[COLOR=#000050]$raw_xml[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]file_get_contents[/COLOR]COLOR=#0000ff[/COLOR];
[COLOR=#000050]$fp[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]fopen[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]$filename[/COLOR], [COLOR=#666666]“w”[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#0000d0]fwrite[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]$fp[/COLOR], [COLOR=#000050]$raw_xml[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#0000d0]fclose[/COLOR]COLOR=#0000ff[/COLOR];
[COLOR=#991010]?>[/COLOR]
So I need to save that my_Xml object to different files… with different file name of course. So the xmlFileName changes all the time inside my flash.
Now… what can I change in the PHP file… so the $filename receives the value from flash?
example 1:
xml_file = “ex1.xml”
[COLOR=#000050]my_Xml[/COLOR].[COLOR=#0000d0]sendAndLoad[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]server_file[/COLOR], [COLOR=#000050]xml_file[/COLOR][COLOR=#0000ff])[/COLOR];
xml_file = “ex2.xml”;
[COLOR=#000050]my_Xml[/COLOR].[COLOR=#0000d0]sendAndLoad[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]server_file[/COLOR], [COLOR=#000050]xml_file[/COLOR][COLOR=#0000ff])[/COLOR];
at the end of this… on my server must appear 2 files: ex1.xml and ex2.xml.
PS: when I run the first script, a blank IE page with the name of the php file appears… how can I get rid of it?
thank you!