0

这是我的网页 httptime_zones/time_zones.php?time_zone=+00:00

在我的页面中我使用下面的代码

$time_zone = $_REQUEST['time_zone'];

但输出在 00:00 这里+标志没有显示......

我怎么做才能从 url 获得全部价值?

4

4 回答 4

2

您可能需要对加号进行编码

time_zones/time_zones.php?time_zone=%2b00:00
于 2013-07-07T11:16:52.763 回答
0

对于 url,您应该使用urlencode()

$time_zone = urlencode($_GET['time_zone']);
于 2013-07-07T11:26:55.417 回答
0
$time_zone = htmlentities($_GET['time_zone']);

参考实体

于 2013-07-07T11:18:25.077 回答
0

尝试对参数进行编码。

将 'time_zone=+00:00' 更改为 'time_zone%3D%2B00%3A00'

参考: HTML URL 编码参考

于 2013-07-07T11:22:20.880 回答