PHP replaces spaces with underlines

后端 未结 4 597
广开言路
广开言路 2020-12-03 05:16

I have the problem, that PHP replaces all spaces with underlines in POST and GET variables.

For example if I have the URL: http://localhost/proxy.php?user name=Max t

4条回答
  •  [愿得一人]
    2020-12-03 05:47

    In the old crazy times of register_globals query string was unpacked by PHP into global variables, but the format of variable identifiers is constrained, so obviously spaces couldn't work. This limitation remained, and honestly I believe it's a good idea to keep it this way.

    If you really cannot change spaces into underscores in your URLs, just mangle the $_GET array when you process the request and substitute every underscore by a space.

提交回复
热议问题