asp fso:只读一行文本

作者:袖梨 2022-07-02

asp fso:只读一行文本ReadLine

set t=fs.OpenTextFile("c:test.txt",1,false)
x=t.ReadLine
t.close
Response.Write("The first line in the file ")
Response.Write("contains this text: " & x)

这样我们就可以只读取一行了喽.下面来看看readall读取全部的内容

dim fs,f,t,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:test.txt")
fs.readall;

www.111com.net/asp/asp.html

相关文章

精彩推荐