📄 aspcheck.asp
字号:
Response.Write "</tr>"
next
end if
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"> ■ 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"> ■ 常见的文件上传和管理组件 </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"> ■ 常见的收发邮件组件</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"> ■ 图像处理组件</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"> ■ 其他组件支持情况检测 </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"> ■ 让服务器执行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> ITlearner公司的电脑 (CPU:Athlon1.6G 内存:512M)</td>
<td> 269.53 毫秒</td>
<td> 328.13 毫秒 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> ITlearner家里的电脑 (CPU:Celeron 2G 内存:512M)</td>
<td> 250.00 毫秒 </td>
<td> 296.88 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 公司的网站服务器 (CPU:XEON2.4G 内存:2G)</td>
<td> 281.25 毫秒 </td>
<td> 234.38 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 中国频道虚拟主机 [2004/6/18 9:10]</td>
<td> 375.00 毫秒</td>
<td> 328.13 毫秒</td>
</tr>
<%
dim i,t1,t2,tempvalue,runtime1,runtime2
'开始计算50万次加法所需时间
t1=timer()
for i=1 to 500000
tempvalue= 1 + 1
next
t2=timer()
runtime1=formatnumber((t2-t1)*1000,2)
'开始计算20万次开方所需时间
t1=timer()
for i=1 to 200000
tempvalue= 2^0.5
next
t2=timer()
runtime2=formatnumber((t2-t1)*1000,2)
%>
<tr bgcolor="#FFFFFF" height=25>
<td align=left> <font color=red>您正在使用的这台服务器</font> <INPUT name="button" type="button" class=backc onclick="document.location.href='<%=hx.FileName%>'" value="重新测试">
</td>
<td> <font color=red><%=runtime1%> 毫秒</font></td>
<td> <font color=red><%=runtime2%> 毫秒</font></td>
</tr>
</table></td>
</tr>
</table>
<br>
<%
End Sub
Sub DriveTest
On Error Resume Next
Dim fo,d,xTestObj
set fo=Server.Createobject("Scripting.FileSystemObject")
set xTestObj=fo.Drives
%>
<a name="DriveTest"></a>
<table border="0" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="25" align="center" bgcolor="#0099CF" onclick="showsubmenu(4)"><font color="#FFFFFF"><strong>服务器磁盘信息
</strong></font>
<%Call smenu(4)%></td>
</tr>
<tr>
<td style="display" id='submenu4'>
<%if hx.IsObjInstalled("Scripting.FileSystemObject") then%>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="7"> ■ 服务器磁盘信息</td>
</tr>
<tr height=18 bgcolor="#FFFFFF" align=center>
<td width="90">磁盘类型</td>
<td width="40">盘符</td>
<td width="30">可用</td>
<td width="100">卷标</td>
<td width="80">文件系统</td>
<td width="130">可用空间</td>
<td width="130">总空间</td>
</tr>
<%
for each d in xTestObj
Response.write "<tr height=18 bgcolor=#FFFFFF>"
Response.write "<td> "&hx.dtype(d.DriveType)&"</td>"
Response.write "<td> "&d.DriveLetter&"</td>"
if d.DriveLetter = "A" then
Response.Write "<td colspan=6> 为防止影响服务器,不检查软驱</td>"
else
Response.write "<td align=center> "
if d.isready then
Response.Write "√"
Response.write "</td>"
Response.write "<td> "&d.VolumeName&"</td>"
Response.write "</td>"
Response.write "<td> "&d.FileSystem&"</td>"
Response.write "<td> "&hx.formatdsize(d.FreeSpace)&"</td>"
Response.write "<td> "&hx.formatdsize(d.TotalSize)&"</td>"
else
Response.Write "×"
Response.Write "<td colspan=4> 可能是磁盘有问题,或者程序没有读取权限</td>"
end if
end if
next%>
</table>
<%
Dim filePath,fileDir,fileDrive
filePath = server.MapPath(".")
set fileDir = fo.GetFolder(filePath)
set fileDrive = fo.GetDrive(fileDir.Drive)
%>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="6"> ■ 当前文件夹信息 (<%=filePath%>)</td>
</tr>
<tr height=18 bgcolor="#FFFFFF" align=center>
<td width="100">已用空间</td>
<td width="100">可用空间</td>
<td width="70">文件夹数</td>
<td width="70">文件数</td>
<td width="130">创建时间</td>
<td width="130">修改时间</td>
</tr>
<%
Response.write "<tr height=18 bgcolor=#FFFFFF align=center>"
Response.write "<td>"&hx.formatdsize(fileDir.Size)&"</td>"
Response.write "<td>"
Response.write hx.formatdsize(fileDrive.AvailableSpace)
if err then
Response.write "没有权限读取"
error.clear
end if
Response.write "</td>"
Response.write "<td>"&fileDir.SubFolders.Count&"</td>"
Response.write "<td>"&fileDir.Files.Count&"</td>"
Response.write "<td>"&fileDir.DateCreated&"</td> "
Response.write "<td>"&fileDir.DateLastModified&"</td> "
Dim i,t1,t2,runtime,TestFileName
Dim tempfo
t1= timer()
TestFileName=server.mappath("ITlearner_Test.txt")
for i=1 to 30
set tempfo=fo.CreateTextFile(TestFileName,true)
tempfo.WriteLine "It's a test file."
set tempfo=nothing
set tempfo=fo.OpenTextFile(TestFileName,8,0)
tempfo.WriteLine "It's a test file."
set tempfo=nothing
set tempfo=fo.GetFile(TestFileName)
tempfo.delete True
set tempfo=nothing
next
t2= timer()
runtime=formatnumber((t2-t1)*1000,2)
%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#99CCFF" height=18>
<td colspan="2"> ■ 磁盘文件操作速度测试 (重复创建、写入、追加和删除文本文件30次,记录其所使用的时间)</td>
</tr>
<tr height=18>
<td width="400" align=center bgcolor="#FFFFFF"><font color="#000000">可
供 参 考 的 服 务 器 列 表</font></td>
<td width="200" align=center bgcolor="#FFFFFF"><font color="#000000">完成时间</font></td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> ITlearner公司的电脑 (CPU:Athlon1.6G 内存:512M)</td>
<td> 218.75 ~ 269.53 毫秒 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> ITlearner家里的电脑 (CPU:Celeron 2G 内存:512M)</td>
<td> 203.13 ~ 250.00 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 公司的网站服务器 (CPU:XEON2.4G 内存:2G)</td>
<td> 187.50 ~ 234.38 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 中国频道虚拟主机 [2004/6/18 9:10]</td>
<td> 703.13 ~ 718.75 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=25>
<td align=left> <font color=red>您正在使用的这台服务器</font> <INPUT name="button2" type="button" class=backc onclick="document.location.href='<%=hx.FileName%>'" value="重新测试">
</td>
<td> <font color=red><%=runtime%> 毫秒</font></td>
</tr>
</table>
<%
else
Response.write " 您的服务器或租用的空间不支持FSO组件,无法进行此项测试!"
end if%>
</td>
</tr>
</table>
<br>
<%
End Sub
Sub SpeedTest%>
<a name="SpeedTest"></a>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#0099CF" class="tableBorder">
<tr>
<td height="25" align="center" bgcolor="#0099CF" onclick="showsubmenu(3)"><font color="#FFFFFF"><strong>服务器连接速度</strong></font>
<%smenu(3)%>
</td>
</tr>
<tr>
<td bgcolor="#F8F9FC" style="display" id='submenu3'> <table width="100%" border="0" cellspacing=1 cellpadding=3 bgcolor="#0099CF">
<tr bgcolor="#FFFFFF">
<td width="80">接入设备</td>
<td width="420"> 连接速度(理想值)</td>
<td width="100">下载速度(理想值)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>56k Modem</td>
<%hx.showPicBar(56)%>
</tr>
<tr bgcolor="#FFFFFF">
<td>64k ISDN</td>
<%hx.showPicBar(64)%>
</tr>
<tr bgcolor="#FFFFFF">
<td>512k ADSL</td>
<%hx.showPicBar(512)%>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19">1.5M Cable</td>
<%hx.showPicBar(1500)%>
</tr>
<tr bgcolor="#FFFFFF">
<td>5M FTTP</td>
<%hx.showPicBar(5000)%>
</tr>
<tr bgcolor="#FFFFFF">
<td>当前连接速度</td>
<%
Response.Flush()
if action="SpeedTest" then
dim i
Response.Write("<script language=""JavaScript"">var tSpeedStart=new Date();</script>")
Response.Write("<!--") & chr(13) & chr(10)
for i=1 to 1000
Response.Write("####################################################################################################") & chr(13) & chr(10)
next
Response.Write("-->") & chr(13) & chr(10)
Response.Write("<script language=""JavaScript"">var tSpeedEnd=new Date();</script>") & chr(13) & chr(10)
Response.Write("<script language=""JavaScript"">")
Response.Write("var iSpeedTime=0;iSpeedTime=(tSpeedEnd - tSpeedStart) / 1000;")
Response.Write("if(iSpeedTime>0) iKbps=Math.round(Math.round(100 * 8 / iSpeedTime * 10.5) / 10); else iKbps=10000 ;")
Response.Write("var iShowPer=Math.round(iKbps / 100);")
Response.Write("if(iShowPer<1) iShowPer=1; else if(iShowPer>82) iShowPer=82;")
Response.Write("</script>") & chr(13) & chr(10)
Response.Write("<script language=""JavaScript"">")
Response.Write("document.write('<td><img align=absmiddle class=PicBar width=""' + iShowPer + '%""> ' + iKbps + ' Kbps');")
Response.Write("</script>") & chr(13) & chr(10)
Response.Write("</td><td> <a href='?action=SpeedTest' title=测试连接速度><u>")
Response.Write("<script language=""JavaScript"">")
Response.Write("document.write(Math.round(iKbps/8*10)/10+ ' k/s');")
Response.Write("</script>") & chr(13) & chr(10)
Response.Write "</u></a></td>"
else
Response.Write "<td></td><td> <a href='?action=SpeedTest' title=测试连接速度><u>开始测试</u></a></td>"
end if
%>
</tr>
</table></td>
</tr>
</table>
<br>
<%End Sub%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -