Application注销的问题
请高手帮看下,昨天还好使的程序,也没动程序啊,为什么今天就注销不了呢?
<SCRIPT LANGUAGE= "VBScript " RUNAT= "Server ">
Sub Session_OnEnd
Application.Lock
Application( "username ")=false
Application.Unlock
End Sub
</SCRIPT>
<%
if request.querystring( "logout ")= "true " then
session.Abandon()
session( "user_name ")=nothing
session( "user_pass ")=nothing
end if
%>
------解决方案-------------------- <SCRIPT LANGUAGE= "VBScript " RUNAT= "Server ">
Sub Session_OnEnd
Application.Lock
Application.Contents.Remove( "username ")
Application.Unlock
End Sub
</SCRIPT>
<%
if request.querystring( "logout ")= "true " then
session.Abandon()
end if
%>
我习惯这么写
------解决方案--------------------session.Abandon()表示去除所以缓存
所以下面两个Set Nothing不用
Application.Contents.Remove表示移除缓存
楼主只是设了一个FALSE值
所以不应该用Application.Contents.Remove( "username ")