一、不要怀疑你的session_onend没有执行(其实开始时我也曾经怀疑过,因为总相信自己的session_onedn事件没有错),常听有些人抱怨:“怎么我的session_onend没有执行,session_onstart是好好的”,当然了,session_onstart容易看到嘛。 如果你不信的话,你将一个标记放到session_onend的第一行。 sub session_onend application("flag1")="session_onend已经执行了" …………后面是你的session_onend的内容 end sub
<SCRipT LANGUAGE="VBScript" RUNAT="Server"> sub Session_onEnd ip=session("userip") application("flag1")=ip ——标记flag1 chatdata=application("chatdata") onliuser=application("onliuser") kicklist=application("kicklist") uleave=false for i=0 to 50 if chatdata(i,1)=ip then kicklist=replace(kicklist,",'#"&chatdata(i,0)&"'","") onliuser=replace(onliuser,",'"&chatdata(i,0)&"'","") chatdata(i,0)="" chatdata(i,1)="" chatdata(i,2)=0 chatdata(i,3)="" chatdata(i,4)=0 chatdata(i,5)="" uleave=true application("flag2")="找到同ip的聊客" ——标记flag2 end if next kicklist=replace(kicklist,",'"&ip&"'","") application("flag3")="kicklist的值为:"&kicklist ——标记flag3 if uleave then for i=0 to 50 chatdata(i,4)=(chatdata(i,4) mod 4)+4 next application("flag4")="执行了通知更新名单" ——标记flag4 end if application("flag5")="第4标志" ——标记flag5 application.lock application("kicklist")=kicklist application("onliuser")=onliuser application("chatdata")=chatdata application.unlock application("flag6")="执行了application变量更新" ——标记flag6 end sub </script>
if keyd="" then response.write application(key) response.end end if
username=application(key) select case keyd case "2" for i=0 to 50 for j=0 to 5 response.write username(i,j)&chr(13)&chr(10) next next case "1" for i=0 to ubound(username,1) response.write i&replace(username(i),"<br>","")&"<br>" next end select %>