Recommended: asp online user statistics code Just copy the code table to a text file and save it in the website (/Global.asa) in the home directory. SCRIPT LANGUAGE=VBScript RUNAT=Server Sub Application_OnStart application(activevisitors)=0 End Sub Sub Application_OnEnd End Sub Sub Session_OnStart application.lock ap
<%
Set fs = CreateObject(Scripting.FileSystemObject)
Wfile=server.mappath() & cgi-binwww.111cn.cn/asp/asp.html.txt
on error resume next
Set a = fs.OpenTextFile(Wfile)
hits = Clng(a.ReadLine)
hits = hits + 1
a.close
If error then
hits = 1
end if
Set a = fs.CreateTextFile(Wfile,True)
a.WriteLine(hits)
a.Close
%>
Number of hits: <% =hits %>
The number of people in your file will increase to every time your page visits. The last line in this script allows you to display the number of clicks on your reply page.
Share: ASP Application Object Tutorial The ASP Application object is a specific ASPApplication program used to share information between all users. All ASP files are in a virtual directory in IIS part of the same ASPApplication program. The Application.Contents collection contains all items, and also adds commands for ASPApplication objects and ASP scripts. The Application.Sta