PDA

View Full Version : [PHP] Image Dimensions



NeoDreamer
June 17th, 2006, 04:20 PM
How do you check the width and height of an uploaded image with $_FILE?

Also, is there a "file exists" function in PHP? After the user has already uploaded an image, I would like to check on a different page whether the image still resides in the designated folder.

Templarian
June 17th, 2006, 04:32 PM
list($headw, $headh) = getimagesize("folder1/folder2/image.gif");

also works on .swf and like all image formats.

hl
June 18th, 2006, 11:41 AM
How do you check the width and height of an uploaded image with $_FILE?

Also, is there a "file exists" function in PHP? After the user has already uploaded an image, I would like to check on a different page whether the image still resides in the designated folder.
file_exists() :P

and temp gave you the rest of your question.