View Full Version : Read a txt file on server

04-30-2004, 04:40 PM
Hi everyone,

I would like to know if is possible in javascript or Vbscript read (only read) a simple .txt file who is located on server.

If it's possible how can I do?

This is my piece of code in vbscript that read a local .txt file
dim fso, ts, retstring, Mostra
Const forReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile ("E:/PROGETTO/XML/storico.txt", ForReading)

What type of modified can I do to this?

Thanks in advance.

04-30-2004, 05:13 PM
Well, there are a few post on that issue in the Post a JavaScript forum here. I wrote one here, Vladdy wrote one here, Skyzyx wrote one for XML files here.

05-01-2004, 01:06 AM
Isn't this what the FAQ (http://codingforums.com/showthread.php?p=178912#post178912) is for? :D

Moreover, congratulations on your new status David. Very much deserved.