如果我.通过$ _GET PHP在其名称中传递PHP变量,则自动用_字符替换它们.例如:
<?php
echo "url is ".$_SERVER['REQUEST_URI']."<p>";
echo "x.y is ".$_GET['x.y'].".<p>";
echo "x_y is ".$_GET['x_y'].".<p>";
Run Code Online (Sandbox Code Playgroud)
...输出以下内容:
url is /SpShipTool/php/testGetUrl.php?x.y=a.b
x.y is .
x_y is a.b.
Run Code Online (Sandbox Code Playgroud)
......我的问题是这样的:有什么方法可以阻止它吗?不能为我的生活弄清楚我做了什么值得这样做
我运行的PHP版本是5.2.4-2ubuntu5.3.