No error when uploading a really big file in PHP?

后端 未结 6 896
说谎
说谎 2021-02-06 18:14

I have a PHP form for uploading files and it works fine and displays an error message if something went wrong. This is all good.

The problem is when I test with a really

6条回答
  •  轮回少年
    2021-02-06 18:28

    Your $_POST is most likely empty because the upload exceeded the post_max_size directive:

    From PHP's directives page:

    If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e.

    , and then checking if $_GET['processed'] is set.

提交回复
热议问题