首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

php 判断是不是为PNG格式的图片

2012-12-19 
php 判断是否为PNG格式的图片function isPng($pngPath){$size getimagesize ($pngPath) $file_extensio

php 判断是否为PNG格式的图片

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;}}

热点排行