Get the size of an image
array getimagesize ( string $filename [, array &$imageinfo ] )
The getimagesize() function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondent HTTP content type.
list($width, $height) = getimagesize($_FILES['file']['tmp_name']);
echo $width;
echo $height;
array getimagesize ( string $filename [, array &$imageinfo ] )
The getimagesize() function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondent HTTP content type.
list($width, $height) = getimagesize($_FILES['file']['tmp_name']);
echo $width;
echo $height;
No comments:
Post a Comment