You can use this to check for an instance of that image file::
public function isValidImage(fileName)
dim fsoObj
set fsoObj = server.createobject("scripting.filesystemobject"
if fsoObj.FileExists(server.mappath("\images" & "\" & fileName) then
isValidImage = true
else
isValidImage = false
end if
if isObject(fsoObj) then set fsoObj = nothing
end function
Then you can call it like so::
if isValidImage("myimage.gif" then
response.write "<img src="xxx.gif">
else
response.write "no image"
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.