PHP upload_max_filesize

后端 未结 5 1137
后悔当初
后悔当初 2021-01-27 10:48

I\'ve a problem with php file upload.
In my php.ini \'upload_max_filesize\' is set to 4mb.
When i try to upload a file bigger than that I never get the UPLOAD_ERR_INI_SI

相关标签:
5条回答
  • 2021-01-27 10:59

    Check these setting in your php.ini also: post_max_size, upload_max_filesize and memory_limit in php.ini. post_max_size should be greater than upload_max_size.

    and if these does not solve problem then check here for more details: http://www.satya-weblog.com/2007/05/php-file-upload-and-download-script.html

    0 讨论(0)
  • 2021-01-27 11:02

    Why is this a problem? You should always check the files array + use the is_uploaded_file function to make sure the file has been uploaded.

    0 讨论(0)
  • 2021-01-27 11:08

    See my answer to a similar question; It sounds like the same issue:

    Why dosen't this upload script work with mp4s, mpegs (and maybe any /large/ files)?

    0 讨论(0)
  • 2021-01-27 11:15

    Is the enctype on your upload form set correctly? -> enctype="multipart/form-data" is required for forms that do file uploads.

    G

    0 讨论(0)
  • 2021-01-27 11:19

    Have you checked another errors? Perhaps you get another error - maybe UPLOAD_ERR_FORM_SIZE and thus you get FILES array empty.

    0 讨论(0)
提交回复
热议问题