日期:2014-05-17 浏览次数:20514 次
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; } }