php 获取图片高宽与宽度代码
在php中要获取图片的高与宽度,php自身带有一个函数getimagesize,他会返回一个数组,数组下标1为图片高度,数组下标0一宽度.
php 获取图片高宽与宽度代码如下:
function getheight($image) {
$size = getimagesize($image);
$height = $size[1];
return $height;
}
function getwidth($image) {
$size = getimagesize($image);
$width = $size[0];
return $width;
}文章地址:http://www.phprm.com/tuxiang/fs4465.html
转载随意^^请带上本文地址!