我是靠谱客的博主 超级芝麻,这篇文章主要介绍asp下的一个检测链接是否正常的函数,现在分享给大家,希望可以做个参考。

Function urlChk(sUrl)
on error resume next
Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "GET",sUrl,false
xmlHttp.send
    if xmlHttp.Status <> 200 then
        urlChk=false
    else
        urlChk=true
    end if
End Function

sUrl="http://www.uoften.com"
if urlChk(sUrl) then
    response.write(sUrl&"(可以正常访问)")
else
    response.write(sUrl&"(访问不了)")
end if

最后

以上就是超级芝麻最近收集整理的关于asp下的一个检测链接是否正常的函数的全部内容,更多相关asp下内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(94)

评论列表共有 0 条评论

立即
投稿
返回
顶部