我正在上传一个tif文件,但我总是得到回声“不支持上传的文件类型”。为什么?如何根据我的支持文件数组检查文件是否受支持
//image types supported
$types = array(IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_TIFF);
list($width, $height, $type) = getimagesize($_FILES[$name]['tmp_name']);
$ext = image_type_to_extension($type); // get the extension
if (!isset($types[$type])) {
echo = 'The uploaded file type is not supported';
} else
echo = 'All good!';
}