软件教程

ASP检测链接是否正常的函数

来源: 本站    类别: 软件教程    日期: 2015/11/1

 

<%
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.shop7z.com/demo2"

if urlChk(sUrl) then
    response.write(sUrl&"(可以正常访问!)")
else
    response.write(sUrl&"(页面打开错误!)")
end if
%>


相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com