<!DOCTYPE html>
<html>
<body>
<p>以下是文本文件中的所有行(带行号):</p>

<%
设置 fs=Server.CreateObject("Scripting.FileSystemObject")
设置 f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)

执行 while f.AtEndOfStream = false
Response.Write("行:"& f.Line& " ")
Response.Write(f.ReadLine)
Response.Write("<br>")
循环

f.Close
设置 f=Nothing
设置 fs=Nothing
%>


</body>
</html>