session.abandon问题

byyt 2005-10-20 04:50:27
我这样写了一段代码,本意是打印后清除SESSION对象,
但是为什么abandon后还可以再次打印该SESSION对象?
<%
dim array(6)
array(0)="天"
array(1)="宇"
array(2)="男"
array(3)="new"
array(4)="old"
array(5)="find"
Session("info")=array
Response.write Session("info")(0) & "<br>"
Response.write Session("info")(1) & "<br>"
Response.write Session("info")(2) & "<br>"
Response.write Session("info")(3) & "<br>"
Response.write Session("info")(4) & "<br>"
Response.write Session("info")(5) & "<br>"

Session.Abandon()

Response.write Session("info")(0) & "<br>"
Response.write Session("info")(1) & "<br>"
Response.write Session("info")(2) & "<br>"
Response.write Session("info")(3) & "<br>"
Response.write Session("info")(4) & "<br>"
Response.write Session("info")(5) & "<br>"
%>
...全文
118 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yutian130 2005-10-20
  • 打赏
  • 举报
回复
dim array(6),i
array(0)="天"
array(1)="宇"
array(2)="男"
array(3)="new"
array(4)="old"
array(5)="find"
for i=0 to UBound(array)
Session("info")=array(i)
response.write array(i)&"<br>"
next
session.abandon()
on errro resume next
for i=0 to UBound(sesseion("info"))
response.write session(i)&"<br>"
next
if err then
err.clear
response.write "会话已停止"
response.end()
end if
byyt 2005-10-20
  • 打赏
  • 举报
回复
~~~晕~~~~没人看到吗?
自己顶~~~

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧