正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -153,7 +153,7 @@ class FileManageController extends BaseController | @@ -153,7 +153,7 @@ class FileManageController extends BaseController | ||
| 153 | if($file->getSize()/1024/1024 > $this->upload_config['upload_max_size']){ | 153 | if($file->getSize()/1024/1024 > $this->upload_config['upload_max_size']){ |
| 154 | $this->fail('超出最大允许上传文件大小:'. $this->upload_config['upload_max_size'] .'M'); | 154 | $this->fail('超出最大允许上传文件大小:'. $this->upload_config['upload_max_size'] .'M'); |
| 155 | } | 155 | } |
| 156 | - $extension = $file->getClientOriginalExtension(); | 156 | + $extension = strtolower($file->getClientOriginalExtension()); |
| 157 | if(!in_array($extension, explode(',', $this->upload_config['allow_file_type']))){ | 157 | if(!in_array($extension, explode(',', $this->upload_config['allow_file_type']))){ |
| 158 | $this->fail('不允许上传的文件类型'); | 158 | $this->fail('不允许上传的文件类型'); |
| 159 | } | 159 | } |
-
请 注册 或 登录 后发表评论