Global.asa
<script language= "vbscript " runat= "server ">
sub Application_OnStart
Session.Timeout=1
Application.Lock
Application( "online_number ")=1
Application.UnLock
end sub
sub Application_OnEnd
end sub
sub Session_OnStart
Application.Lock
Application( "online_number ")=Application( "online_number ")+1
Application.UnLock
end sub
sub Session_OnEnd
Application.Lock
Application( "online_number ")=Application( "online_number ")-1
Application.UnLock
end sub
</script>
s.asp
<%
response.write( "在线人数: " & Application( "online_number "))
%>
------解决方案--------------------
Global.asa 在根目录下才有用