欢迎光临
我们一直在努力

检测个人主页站点是否支持组件的ASP工具

建站超值云服务器,限时71元/月

一个很有用的asp代码—检测个人主页提供站点是否支持组件

现在有很多支持asp服务的个人主页提供站点,但是困惑大家的一点就是

我怎么才能够知道该站点是否支持某些很有用的组件是否安装,例如一些发邮件

的组件jmail,cdo,或则检测是否支持rds,是否支持index server等等,真的很

有用耶。

你所做的是只需要把下面这个检测文件上传到你的个人主页站点上,然后运行

它就可以了,呵呵,很简单的,不用任何附加的组件哦。

检测工具:

checkobj.asp代码如下:

<% @ language="vbscript" %>

<% 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

%>

<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>

我提供这个工具是希望大家把自己的主页越办越好,能够充分利用

你的个人主页站点提供给你的组件做出技术水平更高的asp主页出来。

好运。

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 检测个人主页站点是否支持组件的ASP工具
分享到: 更多 (0)