PHP's new input_filter does not read $_GET or $_POST arrays

前端 未结 6 1490
温柔的废话
温柔的废话 2020-12-16 00:28

In PHP 5.2 there was a nice security function added called \"input_filter\", so instead of saying:

$name = $_GET[\'name\'];

you can now say

6条回答
  •  盖世英雄少女心
    2020-12-16 00:39

    If you are manually changing the array, surely you don't need to sanatise it anyway? Why are you changing the arrays anyway, surely you want them to be an input, rather than something you've programmatically inserted.

    Perhaps more code/context would be helpful.

提交回复
热议问题