Pass a value into filter_input() using variable

前端 未结 3 1216
一向
一向 2021-01-21 23:24

Can anyone please explain, why do I get very strange warning:

filter_input() expects parameter 1 to be long, string given

when executing the co

3条回答
  •  长发绾君心
    2021-01-22 00:05

    INPUT_POST and INPUT_GET are defined as follows:

    /**
     * POST variables.
     * @link http://www.php.net/manual/en/filter.constants.php
     */
    define ('INPUT_POST', 0);
    
    /**
     * GET variables.
     * @link http://www.php.net/manual/en/filter.constants.php
     */
    define ('INPUT_GET', 1);
    

提交回复
热议问题