手机
当前位置:查字典教程网 >编程开发 >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 删除图片与文件函数

一个实用的FSO-实时统计在线人数

多域名绑定到一个空间访问不同首页的技巧

asp的一个日期格式化函数

asp获取数据库的连接属性的方法

一个实用asp分页函数

asp中Byval与Byref的区别

一个可以自动创建多级目录的函数

asp之字符串操作函数

asp 中英文字符长度检测判断函数

精品推荐
分类导航