欢迎光临
我们一直在努力

代码段1—列出你的所有Session变量

建站超值云服务器,限时71元/月

<%@ language=vbscript %>
<% option explicit %>
<%
   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
%> 

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 代码段1—列出你的所有Session变量
分享到: 更多 (0)