$ _POST +键中的空格和点 [英] $_POST + spaces and dots in keys
问题描述
我对POST键有一种非常奇怪的行为。
考虑一个测试:
wtf.html:
=== Cut ===
< form action =" eh.php" method =" POST">
* *< input type =" checkbox" name ="许多空格和。 。点。 。 " />
* *< input type =" submit" value =" Submit">
< / form>
=== Cut ===
eh。 php:
=== Cut ===
<?php
* * print_r($ _ POST);
?>
=== Cut ===
当我们选中复选框并单击Sumbit按钮时,我们会看到:
数组([many_spaces_and____dots____] => on)
通常发送给服务器:
很多+空格+和。+。+点。+。+ =上
但是在$ _POST(或$ HTTP_POST_VARS)中我们看到了我们所看到的。有什么想法吗?
I have a very strange behaviour with POST keys.
Consider a test:
wtf.html:
=== Cut ===
<form action="eh.php" method="POST">
* * <input type="checkbox" name="many spaces and. . dots. . "/>
* * <input type="submit" value="Submit">
</form>
=== Cut ===
eh.php:
=== Cut ===
<?php
* * print_r($_POST);
?>
=== Cut ===
When we check the checkbox and click the Sumbit button we will see:
Array ( [many_spaces_and____dots____] => on )
It is send to server normally:
many+spaces+and.+.+dots.+.+=on
but in $_POST (or $HTTP_POST_VARS) we see what we see. Any ideas?
推荐答案
_POST);
?>
===剪切===
当我们选中复选框并单击Sumbit按钮时,我们将看到:
数组([many_spaces_and____dots____] => on)
通常发送给服务器:
多+空格+和。+。+点。+。+ =
但是在
_POST);
?>
=== Cut ===
When we check the checkbox and click the Sumbit button we will see:
Array ( [many_spaces_and____dots____] => on )
It is send to server normally:
many+spaces+and.+.+dots.+.+=on
but in
_POST(或
HTTP_POST_VARS)中,我们看到了我们所看到的。有什么想法吗?
HTTP_POST_VARS) we see what we see. Any ideas?
这篇关于$ _POST +键中的空格和点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!