Jump to content

Writing to a file


katia

Recommended Posts

I am using this JScript code to write info in a text file. filename is a string that contains the path to my file (by getting the current directory and then concatenating with the path where the file is)function writetofile(filename,info){var ForAppending=8;var fso = new ActiveXObject("Scripting.FileSystemObject");var ts = fso.OpenTextFile(filename, ForAppending, false); ts.WriteLine(info);ts.Close();}This code works when I test my web page ON my computer. The question is will it work on line?

Link to comment
Share on other sites

I don't know anything about JScript :) I can't help you with that, but I can say there might be an easier way (without the knowledge of ActiveX objects) to write something in a file at server-side, take PHP for an example :)

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...