Solve the problem that Codeigniter cannot Upload rar and zip packages. The format restrictions of codeigniter when uploading files are defined in the mimes. php file in config of the application folder. By default, this file does not contain rar, and the definition of zip cannot be uploaded. codeigniter's restrictions on the format when uploading files are defined in the mimes. php file in the config file in the application folder. By default, this file does not contain rar, and the zip definition cannot be uploaded to a compressed package. We can solve this problem by adding the following code to the class:
The code is as follows:
"Zip" => array ("application/x-zip", "application/zip", "application/x-zip-compressed", "application/octet-stream "), // only the first three items are available.
"Rar" => array ("application/octet-stream"), // There is no rar at all, and it is added by itself.
Bytes. By default, this file does not contain rar, and the zip definition cannot be uploaded...