asp下的一个检测链接是否正常的函数
摘要:FunctionurlChk(sUrl)onerrorresumenextSetxmlHttp=Server.CreateObject("M...
FunctionurlChk(sUrl)
onerrorresumenext
SetxmlHttp=Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open"GET",sUrl,false
xmlHttp.send
ifxmlHttp.Status<>200then
urlChk=false
else
urlChk=true
endif
EndFunction
sUrl="http://www.jb51.net"
ifurlChk(sUrl)then
response.write(sUrl&"(可以正常访问)")
else
response.write(sUrl&"(访问不了)")
endif
【asp下的一个检测链接是否正常的函数】相关文章:
下一篇:
asp一句话木马原理分析