📄 aspcheck.asp
字号:
hx.ShowFooter
Set hx= nothing
%>
<%Sub menu%>
选项:<a href="#SystemTest">服务器有关参数</a> | <a href="#ObjTest">服务器组件情况</a> | <a href="#CalcuateTest">服务器运算能力</a>
| <a href="#DriveTest">服务器磁盘信息</a> | <a href="#SpeedTest">服务器连接速度</a>
<%End Sub%>
<%Sub smenu(i)%>
<a href="#top" title="返回顶部"><font face='Webdings' color=#FFFFFF>5</font></a> <span id=txt<%=i%> name=txt<%=i%>><a href='#' title='关闭此项'><font face='Wingdings' color=#FFFFFF>x</font></a></span>
<%End Sub%>
<%Sub SystemTest
on error resume next
%>
<a name="SystemTest"></a>
<table border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="25" align="center" bgcolor="#0099CF" onclick="showsubmenu(0)"><font color=#FFFFFF><strong>服务器有关参数</strong></font>
<%Call smenu(0)%></td>
</tr>
<tr>
<td style="display" id='submenu0'><table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#FFFFFF" height=18>
<td width="130"> 服务器名</td>
<td width="170" height="18"> <%=Request.ServerVariables("SERVER_NAME")%></td>
<td width="130" height="18"> 服务器操作系统</td>
<td width="170" height="18"> <%=Request.ServerVariables("OS")%></td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td> 服务器IP</td>
<td> <%=Request.ServerVariables("LOCAL_ADDR")%></td>
<td> 服务器端口</td>
<td> <%=Request.ServerVariables("SERVER_PORT")%></td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td> 服务器时间</td>
<td> <%=now%></td>
<td> 服务器CPU数量</td>
<td> <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%>
个</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td> IIS版本</td>
<td height="18"> <%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
<td height="18"> 脚本超时时间</td>
<td height="18"> <%=Server.ScriptTimeout%> 秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td> Application变量</td>
<td height="18"> <%Response.Write(Application.Contents.Count & "个 ")
if Application.Contents.count>0 then Response.Write("[<a href=""?action=showapp"">遍历Application变量</a>]")%>
</td>
<td height="18"> Session变量<br> </td>
<td height="18"> <%Response.Write(Session.Contents.Count&"个 ")
if Session.Contents.count>0 then Response.Write("[<a href=""?action=showsession"">遍历Session变量</a>]")%>
</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td height="18"> <a href="?action=showvariables">所有服务器参数</a></td>
<td height="18"> <%Response.Write(Request.ServerVariables.Count&"个 ")
if Request.ServerVariables.Count>0 then Response.Write("[<a href=""?action=showvariables"">遍历服务器参数</a>]")%>
</td>
<td height="18"> 服务器环境变量</td>
<td height="18"> <%
dim WshShell,WshSysEnv
Set WshShell = server.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment
if err then
Response.Write("服务器不支持WScript.Shell组件")
err.clear
else
Response.Write(WshSysEnv.count &"个 ")
if WshSysEnv.count>0 then Response.Write("[<a href=""?action=showwsh"">遍历环境变量</a>]")
end if
%>
</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 服务器解译引擎</td>
<td height="18" colspan="3"> JScript: <%= getEngVerJs() %> | VBScript: <%=getEngVerVBS()%></td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left bgcolor="#FFFFFF"> 本文件实际路径</td>
<td height="8" colspan="3" bgcolor="#FFFFFF"> <%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%></td>
</tr>
</table>
<%
if action="showapp" or action="showsession" or action="showvariables" or action="showwsh" then
showvariable(action)
end if
%>
</td>
</tr>
</table>
<br>
<%
End Sub
Sub showvariable(action)
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#0099CC">
<tr bgcolor="#99CCFF">
<td colspan="2">
<%
on error resume next
dim Item,xTestObj,outstr
if action="showapp" then
Response.Write("<font face='Webdings'>4</font> 遍历Application变量")
set xTestObj=Application.Contents
elseif action="showsession" then
Response.Write("<font face='Webdings'>4</font> 遍历Session变量")
set xTestObj=Session.Contents
elseif action="showvariables" then
Response.Write("<font face='Webdings'>4</font> 遍历服务器参数")
set xTestObj=Request.ServerVariables
elseif action="showwsh" then
Response.Write("<font face='Webdings'>4</font> 遍历环境变量")
dim WshShell
Set WshShell = server.CreateObject("WScript.Shell")
set xTestObj=WshShell.Environment
end if
Response.Write "(<a href="&hx.FileName&">关闭</a>)"
%>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="130">变量名</td>
<td width="470">值</td>
</tr>
<%
if err then
outstr = "<tr bgcolor=#FFFFFF><td colspan=2>没有符合条件的变量</td></tr>"
err.clear
else
dim w
if action="showwsh" then
for each Item in xTestObj
w=split(Item,"=")
outstr = outstr & "<tr bgcolor=#FFFFFF>"
outstr = outstr & "<td>" & w(0) & "</td>"
outstr = outstr & "<td>" & w(1) & "</td>"
outstr = outstr & "</tr>"
next
else
dim i
for each Item in xTestObj
outstr = outstr & "<tr bgcolor=#FFFFFF>"
outstr = outstr & "<td>" & Item & "</td>"
outstr = outstr & "<td>"
if IsArray(xTestObj(Item)) then
for i=0 to ubound(xTestObj(Item))-1
outstr = outstr & hx.formatvariables(xTestObj(Item)(i)) & "<br>"
next
else
outstr = outstr & hx.formatvariables(xTestObj(Item))
end if
outstr = outstr & "</td>"
outstr = outstr & "</tr>"
next
end if
end if
Response.Write(outstr)
set xTestObj=nothing
%>
</table>
<%End Sub%>
<%Sub ObjTest%>
<a name="ObjTest"></a>
<table border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="25" align="center" bgcolor="#0099CF" onclick="showsubmenu(1)"><strong><font color="#FFFFFF">服务器</font></strong><font color=#FFFFFF><strong>组件情况</strong></font>
<%Call smenu(1)%></td>
</tr>
<tr>
<td style="display" id='submenu1'><table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="2"> <font face='Webdings'>4</font> IIS自带的ASP组件</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td width=450 align="center">组 件 名 称</td>
<td width=150 align="center">支持及版本</td>
</tr>
<%hx.GetObjInfo 0,10%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="2"> <font face='Webdings'>4</font> 常见的文件上传和管理组件 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td width=450 align="center">组 件 名 称</td>
<td width=150 align="center">支持及版本</td>
</tr>
<%hx.GetObjInfo 11,15%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="2"> <font face='Webdings'>4</font> 常见的收发邮件组件</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td width=450 align="center">组 件 名 称</td>
<td width=150 align="center">支持及版本</td>
</tr>
<%hx.GetObjInfo 16,23%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="2"> <font face='Webdings'>4</font> 图像处理组件</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td width=450 align="center">组 件 名 称</td>
<td width=150 align="center">支持及版本</td>
</tr>
<%hx.GetObjInfo 24,25%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr>
<td bgcolor="#99CCFF"> <font face='Webdings'>4</font> 其他组件支持情况检测 </td>
</tr>
<FORM action=?action=testzujian method=post id=form1 name=form1 onSubmit="JavaScript:return Checksearchbox();">
<tr>
<td height=30 bgcolor="#FFFFFF">输入你要检测的组件的ProgId或ClassId
<input class=input type=text value="" name="classname" size=40>
<INPUT type=submit value="确定" class=backc id=submit1 name=submit1>
</td>
</tr>
</FORM>
</table></td>
</tr>
</table>
<br>
<%
End Sub
Sub ObjTest2
Dim strClass
strClass = Trim(Request.Form("classname"))
If strClass <> "" then
Response.Write "<br>您指定的组件的检查结果:"
If Not hx.IsObjInstalled(strClass) then
Response.Write "<br><font color=red>很遗憾,该服务器不支持" & strclass & "组件!</font>"
Else
Response.Write "<br><font color=green>"
Response.Write " 恭喜!该服务器支持" & strclass & "组件。"
If hx.getver(strclass)<>"" then
Response.Write " 该组件版本是:" & hx.getver(strclass)
End if
Response.Write "</font>"
End If
Response.Write "<br>"
end if
Response.Write "<p><a href="&hx.FileName&">返回</a></p>"
Response.End
End Sub
Sub CalculateTest
%><a name="CalcuateTest"></a>
<table border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="25" align="center" bgcolor="#0099CF" onclick="showsubmenu(2)"><font color="#FFFFFF"><strong>服务器运算能力</strong></font>
<%Call smenu(2)%></td>
</tr>
<tr>
<td style="display" id='submenu2'> <table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="3"> <font face='Webdings'>4</font> 让服务器执行50万次加法(<font color="#000000">整数运算</font>)和20万次开方(<font color="#000000">浮点运算</font>),记录其所使用的时间。
</td>
</tr>
<tr height=18>
<td width="400" align=center bgcolor="#FFFFFF"><font color="#000000">可
供 参 考 的 服 务 器 列 表</font></td>
<td width="100" align=center bgcolor="#FFFFFF"><font color="#000000">整数运算</font>
</td>
<td width="100" align=center bgcolor="#FFFFFF"><font color="#000000">浮点运算</font></td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 徐咏波公司的电脑 (CPU:Athlon1.6G 内存:512M)</td>
<td> 269.53 毫秒</td>
<td> 328.13 毫秒 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 徐咏波家里的电脑 (CPU:P4 2G 内存:512M)</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -