我试图得到Mime-Type
如下image-types
:
if(!empty($_FILES['uploadfile']['name']) && $_FILES['uploadfile']['error'] == 0){
$file = $_FILES['uploadfile']['tmp_name'];
$file_type = image_type_to_mime_type(exif_imagetype($file));
switch($file_type){
// Codes Here
}
}
但它总是给出错误Call to undefined function exif_imagetype()
。我在这里做错了什么?