手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp下的一个检测链接是否正常的函数
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的一个日期格式化函数

asp中Byval与Byref的区别

个性验证码的制作方法

asp之字符串操作函数

收集asp的常用函数

改进一下asp自带的formatNumber函数

一个实用asp分页函数

asp 删除图片与文件函数

Asp中代码与页面的分离

精品推荐
分类导航