简体   繁体   中英

How to change max_input_vars?

My php version is 5.4.16

I have a form with 2500 fields. That sounds weird, but actually I have an excel sheet. I read the sheet and display all data in an HTML table whose each cell has a hidden field so that I would be able to post all the data and do further.

I found How to increase maximum POST variable in PHP? so I need to change max_input_vars but could not find it.

Issue: I need to change max_input_vars? But i am unable to find it in php.ini

Please help!!!

If you are unable to find it, just add it yourself ;) If it's not there in the configuration file (which is strange) it will assume the default value of 1000 .

max_input_vars = 3000

This value is not possible to set at runtime using ini_set because in the documentation it's specified as PHP_INI_PERDIR which makes sense because the request variables have to be processed by the PHP engine before your script starts.

You can set it in .htaccess as well if you want to make this more specific to this project without affecting other projects in the same server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM