?? asp.asp
字號:
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">服務(wù)器</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> 常見的收發(fā)郵件組件</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>您指定的組件的檢查結(jié)果:"
If Not hx.IsObjInstalled(strClass) then
Response.Write "<br><font color=red>很遺憾,該服務(wù)器不支持" & strclass & "組件!</font>"
Else
Response.Write "<br><font color=green>"
Response.Write " 恭喜!該服務(wù)器支持" & 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>服務(wù)器運算能力</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> 讓服務(wù)器執(zhí)行50萬次加法(<font color="#000000">整數(shù)運算</font>)和20萬次開方(<font color="#000000">浮點運算</font>),記錄其所使用的時間。
</td>
</tr>
<tr height=18>
<td width="400" align=center bgcolor="#FFFFFF"><font color="#000000">可
供 參 考 的 服 務(wù) 器 列 表</font></td>
<td width="100" align=center bgcolor="#FFFFFF"><font color="#000000">整數(shù)運算</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 內(nèi)存:512M)</td>
<td> 269.53 毫秒</td>
<td> 328.13 毫秒 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> ITlearner家里的電腦 (CPU:Celeron 2G 內(nèi)存:512M)</td>
<td> 250.00 毫秒 </td>
<td> 296.88 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 公司的網(wǎng)站服務(wù)器 (CPU:XEON2.4G 內(nèi)存: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>您正在使用的這臺服務(wù)器</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>服務(wù)器磁盤信息
</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"> <font face='Webdings'>4</font> 服務(wù)器磁盤信息</td>
</tr>
<tr height=18 bgcolor="#FFFFFF" align=center>
<td width="90">磁盤類型</td>
<td width="40">盤符</td>
<td width="30">可用</td>
<td width="100">卷標(biāo)</td>
<td width="80">文件系統(tǒng)</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> 為防止影響服務(wù)器,不檢查軟驅(qū)</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> 可能是磁盤有問題,或者程序沒有讀取權(quán)限</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"> <font face='Webdings'>4</font> 當(dāng)前文件夾信息 (<%=filePath%>)</td>
</tr>
<tr height=18 bgcolor="#FFFFFF" align=center>
<td width="100">已用空間</td>
<td width="100">可用空間</td>
<td width="70">文件夾數(shù)</td>
<td width="70">文件數(shù)</td>
<td width="130">創(chuàng)建時間</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 "沒有權(quán)限讀取"
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"> <font face='Webdings'>4</font> 磁盤文件操作速度測試 (重復(fù)創(chuàng)建、寫入、追加和刪除文本文件30次,記錄其所使用的時間)</td>
</tr>
<tr height=18>
<td width="400" align=center bgcolor="#FFFFFF"><font color="#000000">可
供 參 考 的 服 務(wù) 器 列 表</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 內(nèi)存:512M)</td>
<td> 218.75 ~ 269.53 毫秒 </td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> ITlearner家里的電腦 (CPU:Celeron 2G 內(nèi)存:512M)</td>
<td> 203.13 ~ 250.00 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 公司的網(wǎng)站服務(wù)器 (CPU:XEON2.4G 內(nèi)存:2G)</td>
<td> 187.50 ~ 234.38 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=18>
<td align=left> 中國頻道虛擬主機 [2004/6/18 9:10]</td>
<td> 656.25 ~ 718.75 毫秒</td>
</tr>
<tr bgcolor="#FFFFFF" height=25>
<td align=left> <font color=red>您正在使用的這臺服務(wù)器</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 " 您的服務(wù)器或租用的空間不支持FSO組件,無法進行此項測試!"
end if%>
</td>
</tr>
</table>
<br>
<%
End Sub
Sub SpeedTest
Response.Flush()
%>
<a name="SpeedTest"></a>
<% if action="SpeedTest" then%>
<div id="testspeed">
<table width="200" border="0" cellspacing="0" cellpadding="0" class="divcenter">
<tr>
<td height="30" align=center><p><font color="#000000"><span id=txt1>網(wǎng)速測試中,請稍候...</span></font></p></td>
</tr>
</table>
</div>
<% end if%>
<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>服務(wù)器連接速度</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">接入設(shè)備</td>
<td width="420"> 連接速度(理想值)</td>
<td width="100">下載速度(理想值)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>56k Modem</td>
<td><img align=absmiddle class=PicBar width='1%'> 56 Kbps</td><td> 7.0 k/s</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>64k ISDN</td>
<td><img align=absmiddle class=PicBar width='1%'> 64 Kbps</td><td> 8.0 k/s</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>512k ADSL</td>
<td><img align=absmiddle class=PicBar width='5%'> 512 Kbps</td><td> 64.0 k/s</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19">1.5M Cable</td>
<td><img align=absmiddle class=PicBar width='15%'> 1500 Kbps</td><td> 187.5 k/s</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>5M FTTP</td>
<td><img align=absmiddle class=PicBar width='50%'> 5000 Kbps</td><td> 625.0 k/s</td>
</tr>
<tr bgcolor="#FFFFFF">
<td>當(dāng)前連接速度</td>
<%
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>"
%>
<script>
txt1.innerHTML="網(wǎng)速測試完畢!"
testspeed.style.visibility="hidden"
</script>
<%
else
Response.Write "<td></td><td> <a href='?action=SpeedTest' title=測試連接速度><u>開始測試</u></a></td>"
end if
%>
</tr>
</table></td>
</tr>
</table>
<%End Sub%>
</BODY>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -