CodeIgniter upload picture does not correctly identify the problem resolution of the picture type, CodeIgniter upload the picture _php tutorial

Source: Internet
Author: User
Tags codeigniter

CodeIgniter upload picture does not correctly identify the problem resolution of the picture type, CodeIgniter upload the image


In the upload class with CodeIgniter upload pictures, is clearly jpg format picture, but CI always recognized as application/octet-stream type, resulting in upload failure, collected the following information, the solution is as follows:

Open the FileInfo extension in php.ini to get the correct type:
Copy the Code code as follows:
Windows
Extension = Php_fileinfo.dll

Linux
Extension = fileinfo.so

Note: About FileInfo

PHP official recommendation The alternative function of Mime_content_type () is the FileInfo function. PHP 5.3.0+ already supports the FileInfo function (FileInfo support-enabled) By default, and you can use Finfo_open () to determine the file MIME type without having to make any configuration. Centos default installation of the lamp environment PHP version or PHP5.2.6, less than 5.3.0 version may appear similar error prompt: PHP Fatal error:call to undefined function finfo_open () in .... Because the previous PHP version needs to load the Magic_open class, the FileInfo function belongs to the pecl extension, enabling the FileInfo pecl extension to


ACDSEE80 cannot recognize picture file types

Do not know whether this can solve the problem, try it:

1, in the Start-up Control Panel, add/Remove program inside will now delete the ACDSee;

2. Enter "regedit" in the start-to-run to enter the Registry Editor;

3, click "My Computer", with the shortcut key "Ctrl+f" into the search;

4. Enter "ACDSee" in the Find dialog box and delete all relevant content found; (Note that it is best to use "file-and-export" to back up the registry before deleting it, and then find it again to confirm that it has been removed)

3, close the Registry Editor, with "Super rabbit" and then clean up the registry and hard disk (all ACDSee related installation files, including hidden, deleted)

4. Restart the system and install the official ACDSee package. (It is best not to use from some small sites down the beta version, trial version, etc., there may be bugs, and try not to do Chinese, but also more prone to problems, it is strongly recommended to use a mature stable version, the latest version of the General Bug are more)

I wish you a smooth solution to the problem:)

Why is the picture passed to the phone from the computer not recognized by the mobile phone?

File format, generally with JPG or GIF may be bmp ...

http://www.bkjia.com/PHPjc/848798.html www.bkjia.com true http://www.bkjia.com/PHPjc/848798.html techarticle CodeIgniter upload picture does not correctly identify the problem resolution method of the picture type, CodeIgniter upload the image in the upload class with CodeIgniter upload the picture, is clearly a jpg format picture, ...

  • Related Article

    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.