<%@ 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>"
%>
——————————
本站的检测结果:
在你的程序中一共使用了 3 个session变量
在你的程序中一共使用了 4 个application变量
