一个全面获取图象信息的函数getimageinfo(),功能非常不错的。
<?php
function getimageinfo($img) { //img为图象文件绝对路径
$img_info = getimagesize($img);
switch ($img_info[2]) {
case 1:
$imgtype = "gif";
break;
case 2:
$imgtype = "jpg";
break;
case 3:
伊图教程网[www.etoow.com]
http://www.etoow.com/html/2009-04/1238652521.html
$imgtype = "png";
一个非常全面获取图象信息的PHP函数
'http://www.etoow.com/html/2009-04/1238652521.html