取得列数

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

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

 

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

Response.Write(f.Read(2))

Response.Write("<p>The cursor is now standing in position " & f.Column & " in the text file.</p>")

f.Close

 

Set f=Nothing

Set fs=Nothing

%>

 

</body>

</html>

结果:

He

The cursor is now standing in position 3 in the text file.

相关文章