i'm making a random banner script that acquires the banner images remotely instead of being hosted in the own place.
however, whenever the image cannot be acquired, i want to display a image saying "image missing" and not that ugly PHP warning that pops up whenever you put a non-existing image as the argument for getimagesize()
i've tried using file_exists() but it doesn't work
function image ($source,$folder = IMAGE_FOLDER){
$src = $folder.$source;
$size = getimagesize ($src);
return ("src =\"$src\" {$size[3]}");
}
(if anyone hasn't realized, IMAGE_FOLDER has been previously defined as the default image folder, since I also use the function for local images as well)