管理杂谈OA答疑ERP答疑教程搜索

asp判断能否访问外网的一段简单代码


set x = server.createobject("msxml2.xmlhttp")
x.open "get","http://www.baidu.com/img/baidu_logo.gif",false
x.send
if isnull(x.responsetext) then
response.write "no picture!"
else
if (not isempty(x.responsetext)) and lcase(left(x.responsetext,3))="gif" then
response.write "yes,picture!"
else
response.write "no picture!"
end if
end if


更多精彩文章浏览...
点击右上角图标分享到朋友圈
官方网站:http://www.clicksun.cn
咨询热线:400-186-1886
服务邮箱:service@clicksun.cn