争怎路由网:是一个主要分享无线路由器安装设置经验的网站,汇总WiFi常见问题的解决方法。

查看服务器所有Application变量、Session变量工具

时间:2024/6/27作者:未知来源:争怎路由网人气:

经常写ASP,需要定义Application变量、Session变量,有时要检查正确性。虽然网上有类似得程序,但是发现有很多不足,所以自己写了个。
代码如下:

<%@LANGUAGE="JavaScript" CODEPAGE="936"%>
<%
Response.Expires = 0;
Response.Buffer = true;
var tPageStartTime = new Date();
%>
<html>
<head>
<title>网站-Application变量-Session变量</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
body,td {FONT-SIZE: 10pt; FONT-FAMILY: "Arial", "Helvetica", "sans-serif" }
.Table1 { BORDER-RIGHT: #FF9900 1px solid; BORDER-TOP: #FF9900 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #FF9900 1px solid; BORDER-BOTTOM: #FF9900 1px solid }
.Table2 { BACKGROUND-COLOR: #FF9900 }
.TR1 { BACKGROUND-color:#FF9955 }
.TD1 { BORDER-RIGHT: #FEDFB3 1px solid; BORDER-TOP: #FEDFB3 1px solid; BORDER-LEFT: #FEDFB3 1px solid; color:#ff9900; BORDER-BOTTOM: #FEDFB3 1px solid; BACKGROUND-COLOR: #FEDFB3}
.TD2 {BACKGROUND-COLOR: #FEEED6;padding:7px;}
</STYLE>
<table width="750" border="0" cellpadding="3" cellspacing="1" class="Table1">
<tr>
<td class="TR1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif"> <strong>服务器Application变量 [共 <%=Application.Contents.Count%> 个]
<script>showTools();</script></strong></font></td>
<td align="right"> </td>
</tr>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="Table2">
<tr>
<td width="35%" class="TD1">&nbsp;变量</td>
<td width="65%" class="TD1">&nbsp;值</td>
</tr>
<%
var iCount = 0;
var sVarType = "";
var oApplication = new Enumerator(Application.Contents);
var oApp;
for(;!oApplication.atEnd();oApplication.moveNext()){
oApp = oApplication.item();
sVarType = typeof(Application.Contents(oApp));
++iCount;
%>
<tr>
<td align="left" valign="middle" class="TD2"><b><%=oApp%></b><br><i disabled>[<%if(sVarType=="unknown") {Response.Write("Array");}else{Response.Write(sVarType);}%>]</i></td>
<td valign="middle" class="TD2">
<%
try{
if(sVarType=="unknown"){
var oTmp = new VBArray(Application.Contents(oApp));
Response.Write(Server.HTMLEncode(oTmp.toArray()));
}else Response.Write(Server.HTMLEncode(Application.Contents(oApp)));
}catch(e){
Response.Write("<i disabled>[Unknow]</i>");
}
%>
</td>
</tr>
<%
}
if(!iCount){
%>
<tr>
<td align="left" valign="middle" class="TD2" colspan="2">没有Application变量</td>
</tr>
<%
}
%>
</td>
</tr>
<tr>
<td height="5" class="TR1" colspan="2"></td>
</tr>

<br>
<table width="750" border="0" cellpadding="3" cellspacing="1" class="Table1">
<tr>
<td class="TR1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif"> <strong>服务器Session变量 [共 <%=Session.Contents.Count%> 个]
<script>showTools();</script></strong></font></td>
<td align="right">当前会话编号:&nbsp;<%=Session.SessionID%> </td>
</tr>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="Table2">
<tr>
<td width="30%" class="TD1">&nbsp;变量</td>
<td width="70%" class="TD1">&nbsp;值</td>
</tr>
<%
var iCount = 0;
var sVarType = "";
var oSession = new Enumerator(Session.Contents);
var oSes;
for(;!oSession.atEnd();oSession.moveNext()){
oSes = oSession.item();
sVarType = typeof(Session.Contents(oSes));
++iCount;
%>
<tr>
<td align="left" valign="middle" class="TD2"><b><%=oSes%></b><br><i disabled>[<%if(sVarType=="unknown") {Response.Write("Array");}else{Response.Write(sVarType);}%>]</i></td>
<td valign="middle" class="TD2">
<%
try{
if(sVarType=="unknown"){
var oTmp = new VBArray(Session.Contents(oSes));
Response.Write(Server.HTMLEncode(oTmp.toArray()));
}else Response.Write(Server.HTMLEncode(Session.Contents(oSes)));
}catch(e){
Response.Write("<i disabled>[Unknow]</i>");
}
%>
</td>
</tr>
<%
}
if(!iCount){
%>
<tr>
<td align="left" valign="middle" class="TD2" colspan="2">没有Session变量</td>
</tr>
<%
}
%>
</td>
</tr>
<tr>
<td height="5" class="TR1" colspan="2"></td>
</tr>

<% tPageEndTime = new Date(); %>
<center> <%="<br><br>页面执行时间:约 <font color='#990000'><b>"+((tPageEndTime-tPageStartTime))+"</b></font> 毫秒"%><br>Power BY <b><a href="mailto:worm_wang@hotmail.com">Alcohol Wang</a></b></center>
</body></html>

关键词:查看服务器所有Application变量、Session变量工具




Copyright © 2012-2018 争怎路由网(http://www.zhengzen.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版