日期:2014-05-17  浏览次数:20754 次

高手进:如何判断远程图片是否存在 谢谢
如:http://www.tukuz.com/js/qq.gif
这是一张图片,在ASP中,我如何判断这个文件是否存在呢?


------解决方案--------------------
按照我对楼主问题的理解,我的回答是:
把这个地址打开,出现图片,证明该图片存在,如果是红叉,证明该图片不存在
................
------解决方案--------------------
<%
url= "http://www.tukuz.com/js/qq.gif "
on error resume next
Set xmlHttp = Server.CreateObject( "Microsoft.XMLHTTP ")
xmlHttp.open "get ",url,false
xmlHttp.send
if xmlHttp.Status <> 200 then
response.write "不存在 "
else
response.write "存在 "
end if
%>