监测你的站点使用多少session和application的程序

王朝other·作者佚名  2006-11-24
宽屏版  字体: |||超大  

<%@ 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变量

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有