欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SWFUpload與CI不能正確上傳識別文件MIME類型解決方法分享

 更新時間:2011年04月18日 01:42:31   作者:  
問題:swfupload上傳任何文件的mime類型均為application/octet-stream。
解決方案如下,其它框架雷同。

源代碼(/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']);
}

相關(guān)文章

最新評論