逐行读取文本文件中的数据(带行数) <% Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("/text/testread.txt"), 1) do while f.AtEndOfStream = false Response.Write("行 " & f.Line & ": ") Response.Write(f.ReadLine) Response.Write("") loop f.Close Set f=Nothing Set fs=Nothing %>
逐行读取文本文件中的数据(带行数)
效果会显示在右边 Create by 软晨网(RuanChen.com)