03-13-2013, 06:42 AM
[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
My application is running normal in the local computer, but It failed in live server.
So, I look at base\libraries\Upload.php file, and make a modification
So my question is, can somebody explain why in live server I need those break?
Another thing, my browser recognize the file as application/vnd.openxmlformats-officedocument.wordprocessingml.document but CI recognize it as 'application/x-zip'
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))
{
if (in_array($this->file_type, $mime, TRUE))
{
return TRUE;
break; // I add Break
}
}
elseif ($mime == $this->file_type)
{
return TRUE;
}
So my question is, can somebody explain why in live server I need those break?
Quote:Local Server : PHP 5.2.6
Live Server : PHP 5.2.8
Another thing, my browser recognize the file as application/vnd.openxmlformats-officedocument.wordprocessingml.document but CI recognize it as 'application/x-zip'