ASP 跳线法
ASP SkipLine 方法用于在读取文件内容时从文本文件中跳过一行。它是 TextStream 对象的预定义方法。
句法:
TextStreamObject.SkipLine
示例:下面的代码说明了 ASP SkipLine 方法。
ASP
<%
dim gfg,f,t,x
set gfg=Server.CreateObject("Scripting.FileSystemObject")
set f=gfg.CreateTextFile("d:\GFG.txt")
f.writeline("Hello geeks")
f.writeline("Google Chrome")
f.writeline("Sudo placement")
f.close
set t=gfg.OpenTextFile("d:\GFG.txt",1,false)
t.SkipLine
x=t.ReadAll
t.close
Response.Write("Output after skipping the first line is: ")
Response.Write(x)
%>
输出:
Output after skipping the first line is:
Google chrome
Sudo placement