hi guys i am using <input type='file' name='filett' size='filett'> and move the file into the temporary location. Just i wants to know how to get the image size using php . i am using $rect = thegetimagesize("img/flag.jpg"); but if i echo the variable $rect it shows the error
2 Answers
You mean the filesize or dimensions?
Dimensions
getimagesize() will get a bunch of info about an image. Easiest way to get width and height is to assign it to list($width, $height) language construct.
Filesize
filesize() will get the size of bytes in the file. Divide by 1024 to get kilobytes and so forth.
sizeattribute contain a string? AFAIK it is an old integer attribute to refer to how large you want the input. Some browsers ignore it.