CI file type is not allowed in the upload column

Source: Internet
Author: User

Find this passage on the website:

The type of this file is not an error such as the list of forbidden uploads. The main reason for this error is that PHP Hp_fileinfo is not turned on,

Especially under Windows, php5.3 below. Because CI will use this extension to check the file type,

And above php5.3 the extension is introduced by default, not an extension. So you need to open the extension and restart the service.

Another reason is that the MIME type set is special, not the config/mime.php of CI, and the MIME type needs to be added according to the actual situation.

Add MIME type:


Type Optional range of XLS
' xls ' = = Array (' Application/vnd.ms-excel ', ' application/msexcel ', ' application/x-msexcel ', ' application/ X-ms-excel ', ' application/x-excel ', ' application/x-dos_ms_excel ', ' Application/xls ', ' Application/x-xls ', ' Application/excel ', ' application/download ', ' application/vnd.ms-office ', ' Application/msword ', ' application/ Octet-stream '),

Type optional range for xlsx
' xlsx ' = = Array (' Application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ', ' application/zip ', ' Application/vnd.ms-excel ', ' application/ms-excel ', ' application/x-ms-excel ',
' Application/x-msexcel ', ' Application/msword ', ' application/x-excel ', ' application/x-dos_ms_excel ', ' application/ XLS ', ' application/x-xls ', ' application/excel ', ' application/download ', ' Application/vnd.ms-office ',
\ ' Application/msword ', ' application/x-zip ', ' application/octet-stream ', ' application/ Vnd.openxmlformats-officedocument.spreadsheetml.sheet '),

CI file type is not allowed in the upload column

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.