[ic] check image available

Sean Berry sean at buildingonline.com
Mon Mar 19 15:25:17 EST 2007


> How can i check (in perl within a component) if an image in the  
> filesystems exists ?
> I tried to use stat, but gives an error.
> If an image is not (yet) available, we want to show an "image not  
> available" image.

This is how I have always done this.

if (! -f /path/to/image/[value image]) {
	no file, so do something.
} else {
	do something with the image.
}




More information about the interchange-users mailing list