<%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)'從文件中讀取一行數據