SWFUpload与CI不能正确上传识别文件MIME类型解决方法分享
解决方案如下,其它框架雷同。
源代码(/system/libraries/upload.php 199 line)
$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
修改成如下:
源代码(/system/libraries/upload.php 199 line)
$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
修改成如下:
代码如下:
//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']); }
相关推荐
GhostLWB 2020-09-11
一叶不知秋 2020-07-09
天步 2020-06-13
Strongding 2020-06-03
cmsmdn 2020-02-18
ziyifengfei 2008-02-08
书弋江山 2010-10-25
Derllk 2012-05-29
Jruing 2011-05-24
wvfeng 2010-09-14
paanpan 2012-06-01
amazingbo 2019-06-30
分享经验共同进步 2019-06-30
89590599 2019-06-28
王道立心 2019-06-28
VincentDrW 2011-09-16
lizean 2015-05-02
realitycss 2014-12-31