建站常识

asp遍历本地文件判断图片路径是否正确

发布时间 | 2016/11/3  点击 | 

<%
Function GetBody(url)'
Set Retrieval = CreateObject("Microsoft.XMLHTTP")  
Retrieval.Open "Get", url, False, "", ""  
Retrieval.Send() 
if (Retrieval.status=404) then
GetBody=""
else
GetBody =Retrieval.ResponseBody
end if
End Function

str = GetBody("http://www.021jz.com.cn/img/logo.jpg")

if cstr(str) <> "" then
response.write "存在"
else
response.write "不存在"
end if
%>

相关信息