📄 admin_probe.asp
字号:
<td height=20 class=TableRow2> <%=ObjTotest(i,0) & "<font color=#888888> " & ObjTotest(i,1)%></font></td>
<td class=TableRow1> <%
If Not ObjTotest(i,2) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<font class=fonts><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableBorder">
<tr><th>■ 其他组件支持情况检测</th></tr>
<tr height=23 align=center><td width=70% class=TableTitle>
在下面的输入框中输入你要检测的组件的ProgId或ClassId。</td></tr>
<FORM action=<%=Request.ServerVariables("SCRIPT_NAME")%> method=post id=form1 name=form1>
<tr height="23">
<td align=center class=TableRow1 height=30><input class=kuang type=text value="" name="classname" size=40>
<INPUT type=submit value=" 确 定 " class=kuang id=submit1 name=submit1>
<INPUT type=reset value=" 重 填 " class=kuang id=reset1 name=reset1>
</td>
</tr>
</FORM>
</table>
<%if ObjTest("Scripting.FileSystemObject") then
set fsoobj=server.CreateObject("Scripting.FileSystemObject")
%>
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableBorder">
<tr><th colspan=6>■ 服务器磁盘信息</th></tr>
<tr height="20" align=center>
<td width="100" class=TableTitle>盘符和磁盘类型</td>
<td width="50" class=TableTitle>就绪</td>
<td width="80" class=TableTitle>卷标</td>
<td width="60" class=TableTitle>文件系统</td>
<td width="80" class=TableTitle>可用空间</td>
<td width="80" class=TableTitle>总空间</td>
</tr>
<%
' 测试磁盘信息的想法来自“COCOON ASP 探针”
set drvObj=fsoobj.Drives
for each d in drvObj
%>
<tr height="18" align=center>
<td class=TableRow2 align="right"><%=cdrivetype(d.DriveType) & " " & d.DriveLetter%>:</td>
<%
if d.DriveLetter = "A" then '为防止影响服务器,不检查软驱
Response.Write "<td class=TableRow1></td><td class=TableRow1></td><td class=TableRow1></td><td class=TableRow1></td><td class=TableRow1></td>"
else
%>
<td class=TableRow1><%=cIsReady(d.isReady)%></td>
<td class=TableRow1><%=d.VolumeName%></td>
<td class=TableRow1><%=d.FileSystem%></td>
<td align="right" class=TableRow1><%=cSize(d.FreeSpace)%></td>
<td align="right" class=TableRow1><%=cSize(d.TotalSize)%></td>
<%
end if
%>
</tr>
<%
next
%>
</td></tr>
</table>
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableBorder">
<tr><th colspan=5>■ 当前文件夹信息 <%
dPath = server.MapPath("./")
set dDir = fsoObj.GetFolder(dPath)
set dDrive = fsoObj.GetDrive(dDir.Drive)
%>
文件夹: <%=dPath%></th></tr>
<tr height="23" align="center">
<td width="75" class=TableTitle>已用空间</td>
<td width="75" class=TableTitle>可用空间</td>
<td width="75" class=TableTitle>文件夹数</td>
<td width="75" class=TableTitle>文件数</td>
<td width="150" class=TableTitle>创建时间</td>
</tr>
<tr height="20" align="center">
<td class=TableRow1><%=cSize(dDir.Size)%></td>
<td class=TableRow1><%=cSize(dDrive.AvailableSpace)%></td>
<td class=TableRow1><%=dDir.SubFolders.Count%></td>
<td class=TableRow1><%=dDir.Files.Count%></td>
<td class=TableRow1><%=dDir.DateCreated%></td>
</tr>
</td></tr>
</table>
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableBorder">
<tr><th colspan=2>■ 磁盘文件操作速度测试</th></tr>
<tr height="20" align=center>
<td colspan=2 class=TableRow1><%
Response.Write "正在重复创建、写入和删除文本文件50次..."
dim thetime3,tempfile,iserr
iserr=false
t1=timer
tempfile=server.MapPath("./") & "\aspchecktest.txt"
for i=1 to 50
Err.Clear
set tempfileOBJ = FsoObj.CreateTextFile(tempfile,true)
if Err <> 0 then
Response.Write "创建文件错误!"
iserr=true
Err.Clear
exit for
end if
tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck"
if Err <> 0 then
Response.Write "写入文件错误!"
iserr=true
Err.Clear
exit for
end if
tempfileOBJ.close
Set tempfileOBJ = FsoObj.GetFile(tempfile)
tempfileOBJ.Delete
if Err <> 0 then
Response.Write "删除文件错误!"
iserr=true
Err.Clear
exit for
end if
set tempfileOBJ=nothing
next
t2=timer
if iserr <> true then
thetime3=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime3 & "毫秒</font>。"
%>
</td></tr>
<tr height=18>
<td height=20 class=TableRow2> <font color=red>您的服务器: <%=Request.ServerVariables("SERVER_NAME")%></font> </td><td class=TableRow1> <font color=red><%=thetime3%></font></td>
</tr>
</table>
<%
end if
set fsoobj=nothing
end if%>
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableBorder">
<tr><th colspan=3>■ ASP脚本解释和运算速度测试</th></tr>
<tr height="20" align=center>
<td colspan=3 class=TableRow1>
<%
'因为只进行50万次计算,所以去掉了是否检测的选项而直接检测
Response.Write "整数运算测试,正在进行50万次加法运算..."
dim t1,t2,lsabc,thetime,thetime2
t1=timer
for i=1 to 500000
lsabc= 1 + 1
next
t2=timer
thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime & "毫秒</font>。<br>"
Response.Write "浮点运算测试,正在进行20万次开方运算..."
t1=timer
for i=1 to 200000
lsabc= 2^0.5
next
t2=timer
thetime2=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime2 & "毫秒</font>。<br>"
%>
</td></tr>
<tr height=18>
<td height=20 class=TableRow2> <font color=red>您的服务器: <%=Request.ServerVariables("SERVER_NAME")%></font> </td><td class=TableRow1 nowrap> <font color=red><%=thetime%></font></td><td class=TableRow1 nowrap> <font color=red><%=thetime2%></font></td>
</tr>
</table>
<BR>
<table border=0 width=90% align=center cellspacing=0 cellpadding=0>
<tr><td align=center style="LINE-HEIGHT: 150%">
页面装载时间:<script language=javascript>d=new Date();endTime=d.getTime();document.write((endTime-startTime)/1000);</script> 秒<BR> Copyright (c) 2002-2005 <a href="http://www.newasp.net" target="_blank"><font color=#6C70AA><b>Newasp<font color=#CC0000>.Net</font></b></font></a>. All Rights Reserved .
</td></tr>
</table>
</BODY>
</HTML>
<%
function cdrivetype(tnum)
Select Case tnum
Case 0: cdrivetype = "未知"
Case 1: cdrivetype = "可移动磁盘"
Case 2: cdrivetype = "本地硬盘"
Case 3: cdrivetype = "网络磁盘"
Case 4: cdrivetype = "CD-ROM"
Case 5: cdrivetype = "RAM 磁盘"
End Select
end function
function cIsReady(trd)
Select Case trd
case true: cIsReady="<font class=fonts><b>√</b></font>"
case false: cIsReady="<font color='red'><b>×</b></font>"
End Select
end function
function cSize(tSize)
if tSize>=1073741824 then
cSize=int((tSize/1073741824)*1000)/1000 & " GB"
elseif tSize>=1048576 then
cSize=int((tSize/1048576)*1000)/1000 & " MB"
elseif tSize>=1024 then
cSize=int((tSize/1024)*1000)/1000 & " KB"
else
cSize=tSize & "B"
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -