3月9
服务器讯息CheckObjInstalled函数
缺少关键组件的Server,将会使asp运作大受影响,但要如何知道Server支持那些组件呢??
可以使用底下CheckObjInstalled这个函数,它提供很大的便利性
程序代码
<%
Function CheckObjInstalled(strClassString)
On Error Resume Next
Dim Temp
Err = 0
Dim TmpObj
Set TmpObj = Server.CreateObject(strClassString)
Temp = Err
IF Temp = 0 or Temp = -2147221477 Then
CheckObjInstalled= "<font color=""#FF0000""><b>√</b></font>"
ElseIF Temp = 1 or Temp = -2147221005 Then
CheckObjInstalled="<font color=""#FF0000""><b>×</b></font>"
End IF
Err.Clear
Set TmpObj = Nothing
Err = 0
End Function
str=CheckObjInstalled("JMail.Message")
response.write "支援Jmail否??"&str&"<br>"
str=CheckObjInstalled("Persits.MailSender")
response.write "支援AspMail否??"&str&"<br>"
str=CheckObjInstalled("CDONTS.NewMail")
response.write "支援cdonts否??"&str&"<br>"
str=CheckObjInstalled("Persits.Upload")
response.write "支援AspUpload否??"&str&"<br>"
str=CheckObjInstalled("Scripting.FileSystemObject")
response.write "支援Scripting.FileSystemObject否??"&str&"<br>"
str=CheckObjInstalled("MSXML2.ServerXMLHTTP")
response.write "支援MSXML2.ServerXMLHTTP否??"&str&"<br>"
str=CheckObjInstalled("Microsoft.XMLDOM")
response.write "支援Microsoft.XMLDOM否??"&str&"<br>"
str=CheckObjInstalled("ADODB.Stream")
response.write "支援ADODB.Stream否??"&str&"<br>"
str=CheckObjInstalled("Scripting.Dictionary")
response.write "支援Scripting.Dictionary否??"&str&"<br>"
%>
最后编辑: tommyhu 编辑于2009/03/09 14:22
缺少关键组件的Server,将会使asp运作大受影响,但要如何知道Server支持那些组件呢??
可以使用底下CheckObjInstalled这个函数,它提供很大的便利性
程序代码
<%
Function CheckObjInstalled(strClassString)
On Error Resume Next
Dim Temp
Err = 0
Dim TmpObj
Set TmpObj = Server.CreateObject(strClassString)
Temp = Err
IF Temp = 0 or Temp = -2147221477 Then
CheckObjInstalled= "<font color=""#FF0000""><b>√</b></font>"
ElseIF Temp = 1 or Temp = -2147221005 Then
CheckObjInstalled="<font color=""#FF0000""><b>×</b></font>"
End IF
Err.Clear
Set TmpObj = Nothing
Err = 0
End Function
str=CheckObjInstalled("JMail.Message")
response.write "支援Jmail否??"&str&"<br>"
str=CheckObjInstalled("Persits.MailSender")
response.write "支援AspMail否??"&str&"<br>"
str=CheckObjInstalled("CDONTS.NewMail")
response.write "支援cdonts否??"&str&"<br>"
str=CheckObjInstalled("Persits.Upload")
response.write "支援AspUpload否??"&str&"<br>"
str=CheckObjInstalled("Scripting.FileSystemObject")
response.write "支援Scripting.FileSystemObject否??"&str&"<br>"
str=CheckObjInstalled("MSXML2.ServerXMLHTTP")
response.write "支援MSXML2.ServerXMLHTTP否??"&str&"<br>"
str=CheckObjInstalled("Microsoft.XMLDOM")
response.write "支援Microsoft.XMLDOM否??"&str&"<br>"
str=CheckObjInstalled("ADODB.Stream")
response.write "支援ADODB.Stream否??"&str&"<br>"
str=CheckObjInstalled("Scripting.Dictionary")
response.write "支援Scripting.Dictionary否??"&str&"<br>"
%>
最后编辑: tommyhu 编辑于2009/03/09 14:22

手机网页(WAP)如何撰写?
如何制作K线图?





