检测链接 asp下的一个检测链接是否正常的函数

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

检测链接 asp下的一个检测链接是否正常的函数

  2021-03-17 我要评论
想了解asp下的一个检测链接是否正常的函数的相关内容吗,在本文为您仔细讲解检测链接的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点: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="//www.qb5200.com"
if urlChk(sUrl) then
    response.write(sUrl&"(可以正常访问)")
else
    response.write(sUrl&"(访问不了)")
end if

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们