Home > Backend Development > PHP Tutorial > php Get image height, width and width code_PHP tutorial

php Get image height, width and width code_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:45:36
Original
1529 people have browsed it

php gets the image height and width code To get the height and width of an image in PHP, PHP itself has a function getimagesize, which will return an array. The array subscript 1 is the height of the image, and the array subscript 0 is the width.

php tutorial to get image height, width and width code
To get the height and width of an image in PHP, PHP itself has a function getimagesize, which will return an array. The array subscript 1 is the height of the image, and the array subscript 0 is the width.
*/
//you do not need to alter these functions

function getheight($image) {
$size = getimagesize($image);
$height = $size[1];
return $height;
}


//you do not need to alter these functions

function getwidth($image) {
$size = getimagesize($image);
$width = $size[0];
return $width;
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633016.htmlTechArticlephp code to get the height and width of the image. To get the height and width of the image in php, php itself has a Function getimagesize, it will return an array, the array subscript 1 is the height of the image, the array...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template