热门文章
 
其它的ASP常用组件
常用的 ASP Active
ActiveX 组件
Jmail的主要参数列表
ASP用JMail、CDO发
SA-FileUP组件
用 SA FileUp 上传
AspUpload组件上传例
ASPJPEG组件制作图片的
aspjpeg组件使用方法
 推荐文章
 
Aspjpeg添加水印完整方
组件的使用 asp学习网系列
Adodb.Stream 的
aspjpeg组件使用方法
其它的ASP常用组件
常用的 ASP Active
ActiveX 组件
会员系统“找回密码”的制作方
ASP调用dll
ASP用JMail、CDO发
SA-FileUP组件
用 SA FileUp 上传
检测已经安装的常用服务器组件
Jmail的主要参数列表
组件的使用 asp学习网系列
wsImage组件使用方法
 
你现在的位置:您现在的位置是: 中国ASP>>ASP组件>>常用组件
检测已经安装的常用服务器组件

<%

 

'定义检测内容数组
Dim theComponent(11)
Dim theComponentName(11)
theComponent(0) = "ADODB.Connection"
theComponent(1) = "SoftArtisans.FileUp"
theComponent(2) = "AspHTTP.Conn"
theComponent(3) = "AspImage.Image"
theComponent(4) = "LastMod.FileObj"
theComponent(5) = "Scripting.FileSystemObject"
theComponent(6) = "SMTPsvg.Mailer"
theComponent(7) = "CDONTS.NewMail"
theComponent(8) = "Jmail.smtpmail"
theComponent(9) = "SmtpMail.SmtpMail.1"
theComponent(10) = "Persits.Upload.1"
theComponent(11) = "UnitedBinary.AutoImageSize"
theComponentName(0) = "ADODB"
theComponentName(1) = "SA-FileUp"
theComponentName(2) = "AspHTTP"
theComponentName(3) = "AspImage"
theComponentName(4) = "LastMod"
theComponentName(5) = "FileSystemObject"
theComponentName(6) = "ASPMail"
theComponentName(7) = "CDONTS"
theComponentName(8) = "JMail"
theComponentName(9) = "SMTP"
theComponentName(10) = "Persits Upload"
theComponentName(11) = "AutoImageSize"
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
%>
     
<%

'以表格形式循环输出检测内容
Dim i
  
For i=0 to UBound(theComponent)
  If
Not IsObjInstalled(theComponent(i)) Then
   
Else
     
Response.Write "<table><tr>" & vbCrLf
    Response
.Write "<td width=""100%"">" & vbCrLf
    Response
.Write "<b>" & theComponentName(i) & "</b>" & vbCrLf
    Response
.Write "</td>" & vbCrLf
   Response
.Write "</tr></table>" & vbCrLf
      End
If
      
Next 
 
%>


将以上代码直接引入需要页面即可


相关信息:

其它的ASP常用组件
常用的 ASP ActiveX 组件
ActiveX 组件
Jmail的主要参数列表
ASP用JMail、CDO发送邮件
SA-FileUP组件
用 SA FileUp 上传多文件
AspUpload组件上传例子代码

 

中国ASP技术 ASP.ORG.CN 版权所有 2004-2008