PHP 获取图像信息 getimagesize函数

getimagesize() 函数用于获取图像大小及相关信息,成功返回一个数组,失败则返回 FALSE 并产生一条 E_WARNING 级的错误信息。

语法:array  getimagesize(string filename).

<?php
header("content-type:text/html;charset=utf-8");

$img = getimagesize("img/a.png");

echo '<pre>';
var_dump($img);

?>

 结果:

http://i.cnblogs.com/EditPosts.aspx?opt=1

 

 

posted @ 2016-01-31 16:42  侠岚之弋痕夕  阅读(362)  评论(0)    收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!