SCRIPT LANGUAGE="VBScript" RUNAT="Server" > Sub Application_OnStart ' 当服务器开启时,设置用户数为0 Application("Users") = 0 End Sub Sub Session_OnStart Session.Timeout = 20 ' 当开始一个Session时用户数加1 Application.Lock Application("Users") = Application("Users") + 1 Application.UnLock End Sub Sub Session_OnEnd ' 当结束一个Session时用户计数器减1 Application.Lock Application("Users") = Application("Users") - 1 Application.UnLock End Sub /SCRIPT >