The solution is as follows, other frameworks are the same.
Source code (/system/libraries/upload.php 199 line)
$this->file_type = preg_replace("/^(.+?);.*$/", "\1", $_FILES[$field]['type']);
is modified as follows:
Copy code The code is as follows:
//Edit By Tacker
if(function_exists('mime_content_type')){
$this->file_type = preg_replace("/^(.+? );.*$/", "\1", mime_content_type($this->file_temp));
}else{
$this->file_type = preg_replace("/^(.+?) ;.*$/", "\1", $_FILES[$field]['type']);
}
http://www.bkjia.com/PHPjc/323126.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323126.htmlTechArticleThe solution is as follows, other frameworks are the same. Source code (/system/libraries/upload.php 199 line) $this-file_type = preg_replace("/^(.+?);.*$/", "\1", $_FILES[$field]['type ']); modified to...