App下载

demo_readpartoftextfile 在线工具

demo_readpartoftextfile 在线工具

<html>
<body>
<p>This is the first five characters from the text file:</p>

<FONT COLOR=#ff0000><%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.Read(5))
f.Close

Set f=Nothing
Set fs=Nothing
%></FONT>

</body>
</html>
运行结果