$_POST spaces converted in underscores

后端 未结 1 1856
迷失自我
迷失自我 2021-01-12 00:15

I have an HTML dropdown menu that looks like this

 becomes $_REQUEST["a_b"]. 


The full list of field-name characters that PHP converts to _ (underscore) is the following (not just dot):

  • chr(32) (space)
  • chr(46) . (dot)
  • chr(91) [ (open square bracket)
  • chr(128) - chr(159) (various)

If both an open and a closing square bracket are present, they are not converted but the $_POST element becomes an array element.



will become:

$_POST['hor_se'];
$_POST['hor']['se'];

::Reference

0 讨论(0)
提交回复
热议问题