Roh*_*pta 3 php image getimagesize
PHP 手册说它最多返回 7 个元素。并说 0, 1 是宽度和高度,然后是图像类型和属性。然后继续举一个例子,所以
$size=getimagesize()
那么,它返回什么?7 个元素的数组还是只有一个?或者它是自动神奇的?其实我想要宽度,高度,类型和大小。
小智 5
您将获得的图像height,width并type从getimagesize()但大小,你可以使用filesize()的功能。请检查以下示例 -
//Get image information
$getImageInfo = getimagesize("123.png");
print_r($getImageInfo);
//Get image size information
echo filesize("123.png");
数组( [0] => 657 [1] => 543 [2] => 3 [3] => width="657" height="543" [bits] => 8 [mime] => image/png ) 254387
如果这有用,请使其正确答案。
| 归档时间: | 
 | 
| 查看次数: | 5504 次 | 
| 最近记录: |