CodeIgniter restrictions on formatting when uploading a file are defined in the mimes.php file in config in the application folder. The file does not contain RAR by default, and the zip definition cannot upload a compressed package. We can solve this problem by adding the following code to the class:
Copy the code as follows: "zip" = = Array ("Application/x-zip", "Application/zip", "application/x-zip-compressed", " Application/octet-stream "),//originally only the first three items
"rar" = = Array ("Application/octet-stream"),//Originally there is no RAR this one, the whole is to add their own
http://www.bkjia.com/PHPjc/736786.html www.bkjia.com true http://www.bkjia.com/PHPjc/736786.html techarticle CodeIgniter restrictions on formatting when uploading a file are defined in the mimes.php file in config in the application folder. The file by default does not contain RAR, and the definition of zip can not upload pressure ...