All Forums >> [Scripting] >> WSH & Client Side VBScript >> Modifying a text file on the server. Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
i am working on a project where i parse data from a MYSQL DB residing on a web server then write this data into an XML file on the server then use this XML file to create reports/Charts.
I had everything working on my local machine, but when i uploaded the files to the server the XML file wouldn't get updated.
i did use a combination of VBscript and Javascript.
Vbscript to create the file using the following:
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objLogFile = objFSO.CreateTextFile(server.mpapath(".") & "\data.xml", ForWriting, True)
Then used a loop to write data into the objLogFIle etc...
and Javascripts in another HTML page to load the data into a report.
Can anyone help? how to use VBscript to write/modify a text file on the server side? the code above is good only for client side... :)
Thank you for the reply, but the think is, we are not using IIS or apache servers, but something created by National Instrument called G Web Server, and that is why I am limited to VB and Java scripts and maybe CGI. No ASP no PHP. :)