略过文本文件的一行

代码:

<!DOCTYPE html>

<html>

<body>

<p>The first line in the text file is skipped:</p>

 

<%

Set fs=Server.CreateObject("Scripting.FileSystemObject")

 

Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)

f.SkipLine

Response.Write(f.ReadAll)

f.Close

 

Set f=Nothing

Set fs=Nothing

%>

 

</body>

</html>

结果:

The first line in the text file is skipped:

How are you today?

相关文章