开发者

php losing form fields on big file upload

开发者 https://www.devze.com 2023-04-10 01:31 出处:网络
so i\'开发者_JAVA技巧ve read that php clears the $_POST variable when an upload or other data exceeds the limits on POST data. Thus if the user uploads a really big file which php/apache rejects, thei

so i'开发者_JAVA技巧ve read that php clears the $_POST variable when an upload or other data exceeds the limits on POST data. Thus if the user uploads a really big file which php/apache rejects, their form fields will get cleared out and you wont be able to repopulate them. is there a way to get around this? Is this a php issue or an apache issue?


is there a way to get around this?

Many ways, one of them is just to give a 500 response and dying straight away.

Is this a php issue or an apache issue?

Can be both, but I assume it's just that you're hitting the PHP limit for post max size or the memory limit. Configure your server that you have enough resources to handle the file uploads you wish.

0

精彩评论

暂无评论...
验证码 换一张
取 消