How to prevent Warning: POST Content-Length and memory size

前端 未结 7 637
慢半拍i
慢半拍i 2020-12-10 14:46

Currently when user uploads a photo the page says \"Warning: POST Content-Length of XXX bytes exceeds the limit of 21000000 bytes in Unknown on line 0\".

I

7条回答
  •  忘掉有多难
    2020-12-10 15:07

    To Prevent this error to happen you have to check the size of the uploaded files before and in case they're to big you have to cancel the upload!

    To just not show them i think it should be enough if you write in your php script

    error_reporting(0);
    

提交回复
热议问题