exif_imagetypeexif_imagetype
I think the problem is PHP config and/or version, for example, in my case:
We know exif_imagetype() takes a file path or resource and returns a constant like IMAGETYPE_GIFand image_type_to_mime_type() takes that constant value and returns a string 'image/gif', 'image/jpeg', etc.This didn't work (missing function exif_imagetype), so I've found that image_type_to_mime_type() can also take an integer 1, 2, 3, 17, etc. as input, so solved the problem using getimagesize, which returns an integer value as mime type:
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shumachanpin/article-51576-1.html
么么哒哈哈