PDA

View Full Version : Saving XML to file



Roing
June 7th, 2003, 07:54 PM
Hi

I have a Flash movie that uase a XML file as database. Now I whant to edit the information... The editing in Flash is no problem but Flash can't save to file...
I need PHP for this.

The XML info is POSTed to the PHP file. Somehow the XML info sould the be put in to a XML file... I have a script that run on ASP that does this...

-----------------------------------------------
<i>

On Error Resume Next
Dim fileName, fullPath

fileName=Request.Form("fileName")
fullPath=Server.MapPath(fileName)

Dim xmlDoc, xmlData

xmlData=Request.Form("xmlData")
set xmlDoc=CreateObject("Msxml2.DOMDocument")
xmlDoc.async=False

xmlDoc.LoadXML(xmlData)
xmlDoc.Save(fullPath)

dim taskStatus

if err then
taskStatus="taskStatus=Error saving XML document as " & fileName
else
taksStatus="taskStatus=Saved XML document as " & fileName
end if

Response.Write taskStatus
</i>
-----------------------------------------------


Could someone please help me?