Fix codeigniter cannot upload rar and zip package issues _php Tutorial

Source: Internet
Author: User
Tags codeigniter
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.