function isPng($pngPath)
{
$size = getimagesize ($pngPath);
$file_extension = strtolower(substr(strrchr($pngPath,'.'),1));
if('image/png' != $size['mime'] || $file_extension != 'png')
{
return FALSE;
}
else {
return TRUE;
}
}
php 判断是否为PNG格式的图片
最新推荐文章于 2024-05-22 12:18:06 发布