Handling PHP Files Exceeding post_max_size
PHP provides two settings, upload_max_filesize and post_max_size, to limit file uploads. If a file exceeds upload_max_filesize, PHP returns its size as 0, while exceeding post_max_size results in a silent script failure.
Is there a way to catch the post_max_size error?
According to the documentation, post_max_size errors result in empty $_POST and $_FILES arrays. This can be detected by passing a $_GET variable to the processing script (e.g.,
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3