最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
检测ISP是否支持ASP组件的代码
时间:2022-06-30 11:12:59 编辑:袖梨 来源:一聚教程网
<%Option Explicit%>
<%
' 这是一些随IIS4附带的一些组件(默认的)
Dim theInstalledObjects(8)
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"
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
%>
>
检测ISP是否支持ASP组件的工具
在下面的输入框中输入你要检测的组件的ProgId或则ClassId.
如果你没有输入的话,将使用默认值。
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write strClass & " "
If Not IsObjInstalled(strClass) then
Response.Write "本主页提供站点不支持这个组件"
Else
<%
' 这是一些随IIS4附带的一些组件(默认的)
Dim theInstalledObjects(8)
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"
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
%>
>
在下面的输入框中输入你要检测的组件的ProgId或则ClassId.
如果你没有输入的话,将使用默认值。
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write strClass & " "
If Not IsObjInstalled(strClass) then
Response.Write "本主页提供站点不支持这个组件"
Else
相关文章
- 币圈三大主流交易所详解 币安 Coinbase 火币对比分析 08-01
- 《无尽冬日》六代盾无名强度测评 08-01
- 《这城有良田》李光弼及关羽抽取推荐 08-01
- 《世界启元》S9赛季三队共存阵容搭配建议 08-01
- BNX价格上涨分析:BinaryX能否突破历史高点? FORM代币前景预测 08-01
- 《世界启元》S9赛季哥刘孔阵容攻略 08-01