答案:如何防范利用刷新来“作弊”的计数器?
<%
If IsEmpty(Session("Connected")) Then
Application.Lock
Application("counter") = Application("counter") + 1
Application.UnLock
End If
Session("Connected") = True
%>
<html>
<body BGCOLOR=WHITE>
<p align="center">山水盈盈之拒绝刷新计数器</p><p align="center">欢迎光临随风起舞,您是第 <%=Application("counter")%> 位来访者!</p>
</body></html>
[1]