<%set fs=server.createobject("scripting.filesystemobject")file=server.mappath("read.txt")set txt=fs.opentextfile(file,1,true)if not txt.atendofstream thenline=txt.ReadAllresponse.write line & "<br>"end if%>
line=txt.ReadAll'读取文件中的所有数据 line=txt.ReadLine'从文件中读取N个字节的数据line=txt.Read(N)'从文件中读取一行数据