setting max_input_vars PHP.ini directive using ini_set

后端 未结 2 1806
礼貌的吻别
礼貌的吻别 2020-12-10 01:48

Can I set the max_input_vars PHP.ini directive in my code? I have it set at the default 1000, however I have a script that has many checkboxes and text fields that could, an

2条回答
  •  执笔经年
    2020-12-10 02:11

    I know many people avoid accessing php.ini due to one reason or the other. so another way would be to create a .htaccess file in the operation folder and add the following codes and set the values to a higher value. Just add them directly no need to initialize anything in the .htaccess file

    php_value max_input_vars 3000
    php_value suhosin.get.max_vars 3000
    php_value suhosin.post.max_vars 3000
    php_value suhosin.request.max_vars 3000
    

    This solution worked for me without accessing the php.ini file. since some of the web host providers give us a hard time when we want to access the php.ini file

提交回复
热议问题