« join 方式SQL Server 字符串函数一览 »

罗列全部session和application

<%@ Language=VBScript %>
 <% Option Explicit %>
 您的sessionID号是:<%=session.sessionid%><br>
 <%
 Response.Write "在你的程序中一共使用了 " & Session.Contents.Count & _
 " 个Session变量<P>"
 Dim strName, iLoop
 For Each strName in Session.Contents
 ''判断一个Session变量是否为数组
 If IsArray(Session(strName)) then
 ''如果是数组,那么罗列出所有的数组元素内容
 For iLoop = LBound(Session(strName)) to UBound(Session(strName))
 Response.Write strName & "(" & iLoop & ") - " & _
 Session(strName)(iLoop) & "<BR>"
 Next
 Else
 ''如果不是数组,那么直接显示
 Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
 End If
 Next
 
 Response.Write "在你的程序中一共使用了 " & application.Contents.Count & _
 " 个application变量<P>"
 %>
原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]

相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。