PHP头条
热点:

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


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

www.phpzy.comtrue/phprm/29099.htmlTechArticlephp判断是不是为PNG格式的图片 php 判断是否为PNG格式的图片 function isPng($pngPath){$size = getimagesize ($pngPath); $file_extension = strtolower(substr(strrchr($pngPath,'.'),1));if('image/png' != $size['mime'] || $file_e...

相关文章

PHP之友评论

今天推荐