test 文件如下:
张三,男,50岁
李四,女,30岁
<%
whichfile=server.mappath("test.txt")
Dim fso,theFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile(whichfile,1,False)
i=0
Do While theFile.AtEndOfStream <> True
session("行"&i) = theFile.ReadLine
i=i+1
Loop
theFile.Close
for j=0 to i-1
arry=split(session("行"&j),",")
response.write arry(0)+arry(1)+arry(2)+"<br>"
next
%>
转载于:https://blog.51cto.com/332374363/903906