Php file upload. tmp file, finfo cannot read mime type

Source: Internet
Author: User
Tags tmp file
I am also messy. the {code...} in PS: was tested by me {code...} and printed randomly. The problem is not that

I am also messy,
PS: Medium

Finfo_file ($ finof, basename ($ this-> filePath ))

Yes, I tested it before.

Finfo_file ($ finof, $ this-> filePath)

This is not the problem if you try to print it.

Reply content:

I am also messy,
PS: Medium

Finfo_file ($ finof, basename ($ this-> filePath ))

Yes, I tested it before.

Finfo_file ($ finof, $ this-> filePath)

This is not the problem if you try to print it.

Finfo_fileThe file path is required, not the file name.

Basename ('C: \ Windows \ Temp \ phpA9C5. tmp ') = 'phpa9c5. tmp'.

So you should removeBasenameFunction

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.