PHP $_files getting file size issues

Source: Internet
Author: User
Why do I use $_files this gets the uploaded file size more than 2MB can not get the size of the file?
Can be obtained at less than 2MB
Is it related to the setup in php.ini?


Reply to discussion (solution)

It's about the setup in php.ini.

Maximum upload file limit upload_max_filesize

Yes, upload_max_filesize change to 100M.

Upload_max_filesize Change to 100M

More than the size of the php.ini set, it is not only $_files $_post $_get and so on all failure

Yes, of course! You can set a bit, or you can look at the error message, you know why not see the uploaded files, it is recommended to $_files,var_dump out!

Maximum upload file limit upload_max_filesize

Maximum upload file limit upload_max_filesize


The maximum value of the uploaded file is set inside

Check $_files[' ERROR ' first, not 0 is an error,
1 file size exceeds server limit
2 file size to upload exceeds browser limit
3 files are only partially uploaded
4 did not find the file to upload
5 Server Temp folder is missing
6 file writes to Temp folder error

Upload_max_filesize Default Limit 2Mb

  • 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.