Weird Thing When Uploading docx - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Weird Thing When Uploading docx (/showthread.php?tid=57417) |
Weird Thing When Uploading docx - El Forum - 03-13-2013 [eluser]pengenbelajarCI[/eluser] Hi, Recently I found weird thing. So I make upload class, and the problem is with docx file. The mime of the docx is like this Code: 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip','application/haansoftdocx','application/x-zip'), So, I look at base\libraries\Upload.php file, and make a modification Code: if (is_array($mime)) So my question is, can somebody explain why in live server I need those break? Quote:Local Server : PHP 5.2.6 Another thing, my browser recognize the file as application/vnd.openxmlformats-officedocument.wordprocessingml.document but CI recognize it as 'application/x-zip' Weird Thing When Uploading docx - El Forum - 03-13-2013 [eluser]TheFuzzy0ne[/eluser] You don't. You must be barking up the wrong tree. Once you return anything, the current method/function is exited. That break will never get hit. Try changing it to die() or exit(), and you'll see that it's never executed. I suspect it's something else that's fixed it. |