用两个文件.GLOBAL.ASA和online.asp下面分别给出两个文件的源代码.
Sub Application_onStart Application("OnLine") = 0 End Sub
Sub Session_onStart Application.Lock Application("OnLine") = Application("OnLine") + 1 Application.Unlock End Sub
如果防止刷新,不要下面这段!Sub Session_OnEnd Application.Lock Application("OnLine") = Application("OnLine") - 1 Application.Unlock End Sub
online.asp代码如下!<%@language=VBscript%>