Solving the problem of incomplete post data in php5.3.9_PHP tutorial

WBOY
Release: 2016-07-13 10:43:21
Original
878 people have browsed it

A max_input_vars variable was added in php5.3.9. If the data submitted by your post exceeds the max_input_vars value, some data will be lost.

Recently, a strange phenomenon occurred in the project. There was a large form with thousands of inputs. When submitting, I always found that the posted data was incomplete. At first, I suspected that there was a conflict in the html form name. Ruled out.

Then, I searched a lot online and found that the post_max_size and upload_max_filesize of php.ini were set to very large values, but it was useless. The client_max_body_size 500m; of nginx was set to such large values, but it was useless.

Finally I found the solution via google:

It turns out that PHP has added a variable max_input_vars since 5.3.9 to limit the number of submitted forms. I am really speechless.

1111111111111 php post数据不完整

This value is 1000 by default, which cannot meet the needs of more than 1000 input items, so a larger value must be added to php.ini such as:

max_input_vars = 5000, restart php after modification, and finally everything is normal!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633177.htmlTechArticleA max_input_vars variable has been added in php5.3.9. If the data submitted by your post exceeds the max_input_vars value, there will be Some data is lost. Recently, something strange happened in the project...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!