时间:2021-07-01 10:21:17 帮助过:3人阅读
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; } }