案例:ASP/ADO案例     状态:不可编辑再运行    进入竖版
 运行结果 
x
 
1
<%
2
Set FS=Server.CreateObject("Scripting.FileSystemObject")
3
Set RS=FS.OpenTextFile(Server.MapPath("/example/aspe/counter.txt"), 1, False)
4
fcount=RS.ReadLine
5
RS.Close
6
7
fcount=fcount+1
8
9
'为了服务器的安全,以下写入文件部分不会被执行:
10
'Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 2, False)
11
'RS.Write fcount
12
'RS.Close
13
14
Set RS=Nothing
15
Set FS=Nothing
16
17
%>
18
<html>
19
<body>
20
<p>
21
本页已被访问了 <%=fcount%>  次。
22
</p>
23
</body>
24
</html>