⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkserver.asp

📁 8款下载系统源代码 2003-3-11 21:37:45 433 949k · 都很常见: 猛虎山庄、燕衔泥(飞扬的软件第二版用的就是他
💻 ASP
字号:
<% @ Language="VBScript" %>
<% Option Explicit %>
<%
' 这是一些随IIS4附带的一些组件(默认的)
Dim theInstalledObjects(12)
theInstalledObjects(0) = "MSWC.AdRotator"
theInstalledObjects(1) = "MSWC.BrowserType"
theInstalledObjects(2) = "MSWC.NextLink"
theInstalledObjects(3) = "MSWC.Tools"
theInstalledObjects(4) = "MSWC.Status"
theInstalledObjects(5) = "MSWC.Counters"
theInstalledObjects(6) = "IISSample.ContentRotator"
theInstalledObjects(7) = "IISSample.PageCounter"
theInstalledObjects(8) = "MSWC.PermissionChecker"
theInstalledObjects(9) = "CDONTS.NewMail"
theInstalledObjects(10) = "Scripting.FileSystemObject"
theInstalledObjects(11) = "adodb.connection"
theInstalledObjects(12) = "adodb.recordset"

Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
%>
<HTML>
<HEAD>
<TITLE>检测ISP是否支持ASP组件的工具</TITLE>
</HEAD>
<BODY>
在下面的输入框中输入你要检测的组件的ProgId或则ClassId.
如果你没有输入的话,将使用默认值。
<FORM action=<%=Request.ServerVariables("SCRIPT_NAME")%> method=post>
<input type=text value="" name="classname" size=40>
<INPUT type=submit value=Submit>
<INPUT type=reset value=Reset> 
</FORM>
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write strClass & " "
If Not IsObjInstalled(strClass) then 
Response.Write "<strong>没有安装,本主页提供站点不支持这个组件</strong>"
Else
Response.Write "安装了,本主页提供站点支持使用这个组件!"
End If
Response.Write "<P>" & vbCrLf
Else
%>
<TABLE BORDER=0>
<%
Dim i
For i=0 to UBound(theInstalledObjects)
Response.Write "<TR><TD>" & theInstalledObjects(i) & "</TD><TD>"
If Not IsObjInstalled(theInstalledObjects(i)) Then 
Response.Write "<strong>没有安装,本主页提供站点不支持这个组件</strong>"
Else
Response.Write "安装了,本主页提供站点支持使用这个组件!"
End If
Response.Write "</TD></TR>" & vbCrLf
Next
%>
</TABLE>
<%
End If
%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -