Home > Backend Development > PHP Tutorial > Solution to a large amount of data being lost when submitting a php form_PHP Tutorial

Solution to a large amount of data being lost when submitting a php form_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:37:09
Original
988 people have browsed it

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, Google found a solution: 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.

Solution to a large amount of data being lost when submitting a php form_PHP Tutorial

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
Modify After restarting apache, everything was finally normal!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736814.htmlTechArticleRecently, a strange phenomenon occurred in the project. There was a large form with thousands of inputs. Sometimes, I always find that the data posted is incomplete. At first, I suspected it was an html table...
Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template