<title></title>
<body>
<% Langu Age = VBScript%
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TRISTAT Eusedefault =-2, TristateTrue =-1, tristatefalse = 0
Dim filename
filename = "test.txt" ' Default relative path is C:winnt
Set fs = CreateObject ("Scripting.FileSystemObject")
Set F = fs. GetFile (filename)
Set READF = F.openastextstream (forreading,tristatefalse)
' first argument is optional. Input/output mode, which is one of the following three constants:
' forreading=1 read-only, forwriting=2-writable, or forappending=3-append
' The second parameter is optional. One of three tristate values,
' indicates in what format the file is opened. Ignoring this parameter, the file is opened in ASCII
' format. Tristateusedefault=-2 open file in system default format,
' tristatetrue=-1 open file in Unicode formator Tristatefalse=0
' opens the file in ASCII format.
' can also open files using the OpenTextFile method
S = readf. ReadLine
Do While READF. AtEndOfLine <> True
s = readf. ReadLine
Response.Write S & "read the file line by row and write
Loop
readf.close
%>
</bod y>