在包含文件中加入
if cint(Timer-session("time1"))>600 then
response.write "已经过期!请重新登陆!"
response.redirect "index.asp"
else
session("time1")=Timer
end if
不过要在登陆之后的第一个文件中加入session("time1")=Timer
就可以了
用过期可以呀,当用户一段时间不作出反应的话就让他自动执行
初始化
session("time1")=Timer
判断过期
if cint(Timer-session("time1"))>600 then
response.write "已经过期!"
end if
最好做成包含文件,放在所有需要的文件头