Asp教程:ASP制作计数器(三)
例3 计数器正式版
<html>
<head>
<title>计数器正式版</title>
</head>
<body>
<p align="center">您是本网站的第
<font color="blue">
<%
Sub Numberpad()
Set files=Server.CreateObject("Scripting.FileSystemObject")
Set numtxt=files.OpenTextFile(Server.MapPath("/Num.txt"))
Application("Num")=numtxt.ReadLine
numtxt.Close
Application("Num")=Application("Num")+1
Response.Write Application("Num")
Set numtxt=files.CreateTextFile(Server.MapPath("/Num.txt"),True)
numtxt.WriteLine(Application("Num"))
numtxt.Close
End Sub
Application.Lock
Numberpad
Application.UnLock
%>
</font>
位访问者</p>
</body>
</html>
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |