ITPub博客

首页 > 应用开发 > IT综合 > 查看ASP Session 变量的小工具 (转)

查看ASP Session 变量的小工具 (转)

原创 IT综合 作者:worldblog 时间:2007-12-13 15:43:02 0 删除 编辑
查看ASP Session 变量的小工具 (转)[@more@]

<%@ LANGUAGE="vbscript" %>
<%
'#####################################################
'Function: 
'  List server Session variable &  Application  variable
'Author: Hardy He
'Date:  2003-3-12 23:30
'Memo: Be care for diffrent virtul path show diffrent Session
'#####################################################
%>


<%
  Dim sessitem
 
 
  response.write "SessionID: " & Session.SessionID & "
"
  response.write "List of " & Session.Contents.Count & "  items in Session  contents collection: "
 
 
  intItem=1
  For Each sessitem in Session.Contents
  response.write ""
  If Isobject(Session.Contents(sessitem)) Then
    Response.Write  ""
    Response.Write  ""
    Response.Write  ""
  Else
  If IsArray(Session.Contents(sessitem)) Then 
    Response.Write  ""
  Response.Write  "" + ""
 
  Else
    Response.Write  ""
  Response.Write  ""
  Response.Write  "" 
  End If
  End If
  response.write ""
  intItem=intItem+1 
  Next
 
%>
"+CStr(intItem) + ""+sessitem+ ""+"Session object"+ ""+CStr(intItem) + ""+"Array Object "+ ""
 
  For each objArray in Session.Contents(sessitem)
  Response.Write  "***;"
  Next
  Response.Write "
"+CStr(intItem) + ""+ sessitem + ""+ CStr(Session.Contents(sessitem)) + "





LIST Application




<%

  intItem=1
  For Each Key in Application.Contents

  Response.Write  "

"
  If IsObject(Application.Contents(intItem)) Then
 
  Response.Write  ""
  Response.Write  ""
  Response.Write  ""
 
  Else 
  Response.Write  ""
  Response.Write  ""
  Response.Write  "" 
  End If
  intItem=intItem+1
  Response.Write  ""
 
  Next
 
 %>
"+CStr(intItem) + ""+CStr(Key) + ""+"Object" + ""+CStr(intItem) + ""+CStr(Key) + ""+CStr(Application.Contents(intItem)) + "

 


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-992929/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    6241
  • 访问量
    2405613