|
@@ -305,8 +305,7 @@ class Core
|
|
|
{
|
|
|
if (isset($this->data['file']['type'])) {
|
|
|
$ext = $this->getExtByMine($this->data['file']['type']);
|
|
|
- }
|
|
|
- if (function_exists('finfo_open')) {
|
|
|
+ } elseif (function_exists('finfo_open')) {
|
|
|
$finfo = finfo_open(FILEINFO_MIME); // 返回 mime 类型
|
|
|
$code = finfo_file($finfo, $filename);
|
|
|
finfo_close($finfo);
|