<%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'讀取文件中的所有數(shù)據(jù) line=txt.ReadLine'從文件中讀取N個(gè)字節(jié)的數(shù)據(jù)line=txt.Read(N)'從文件中讀取一行數(shù)據(jù)