hEAD>
<% Language = VBScript%>
<%
Const forreading = 1, forWriting = 2, FORAPPPpending = 8
Const tristateusedefault = -2, tristatetrue = -1, tristatefalse = 0
DIM FileName
FileName = "Test.txt" 'Default relative path is C: Winnt
Set fs = creteObject ("scripting.filesystemobject")
Set f = fs.getfile (filename)
Set readf = f.openastextStream (Forreading, Tristatefalse)
'The first parameter is optional. Input / output mode is one of the following three constants:
'Forreading = 1 read, spewriting = 2 can be read or written or promised = 3 append
'The second parameter is also optional. One of the three Tristate values,
'Point out to open the file in what format. Ignore this parameter, the file is ascii
'Format is opened. TristateuseDefault = -2 Open files in the default format of the system,
'TristateTrue = -1 Open files in Unicode format or tristatefalse = 0
'Open files in ASCII format.
'You can also open files with OpenTextFile methods
s = readf.readline
Do While Readf.atendofline <> TRUE
s = readf.readline
Response.write s & "" reads the file by line and writes
Loop
Readf.close
%>
body>
html>