The most common method of realizing online number statistics is Golobal.asa combined with session, but this approach has two adverse:
1. Each session is to take up 12K server memory space, and pay 12K memory for the number of people 1.
2, Golobal.asa will work in the root of the website, and the root directory can only have a golobal, contradictory.
To this end, there is a way to use cookie and Application in the ASP file to realize online statistics. Welcome to the criticism, joint discussion:
Step 1: Do a framework, including hidden framework (Count.asp)
Step 2: Write Count.asp <% User = Request.Cookies ("21bbsuserName") Totaluser = Application ("User") IF INSTR (Totaluser, User) = 0 ThenApplication.lockApplication ("User") = TotalUser & ";" & useerapplication.unlockend IF%>
head> body> html>
Step 3: Display User = Split (Application (";"), ";" Num = Ubound (user) response.write Num