|
Text File Reading
filename=/learn/test/txtread.asp
<html><head>
<TITLE>txtread.asp</TITLE>
</head><body bgcolor="#FFFFFF">
<%
whichfile=server.mappath("/aspheader.asp")
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(whichfile, 1, False)
counter=0
do while not thisfile.AtEndOfStream
counter=counter+1
thisline=thisfile.readline
response.write thisline & "<br>"
loop
thisfile.Close
set thisfile=nothing
set fs=nothing
%>
</body></html>
|