asp利用fso来显示文本文件的所有内容的代码。注:1.txt为当前目录下的文本文件,如果要显示其他文本文件,需要更换地址。 <% Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject") path=server.mappath("1.txt") Set MyTextFile=MyFileObject.OpenTextFile(path) While NOT MyTextFile.AtEndOfLine Response.Write(MyTextFile.Readline)&"<br>" WEND MyTextFile.Close %>