Php URL丢失加号
我意识到在URL中,+符号代表一个空格,但是我需要保留加号。我该怎么做?我的URL和代码如下:Php URL丢失加号,php,url,Php,Url,我意识到在URL中,+符号代表一个空格,但是我需要保留加号。我该怎么做?我的URL和代码如下: http://www.example.com/path/test.php?test=2+2 <?php $test = $_GET['test']; echo $test; ?> http://www.example.com/path/test.php?test=2+2 这将打印出2 2 被解释为URL中的一个空格。要使用+,您需要%2B 被解释为URL中的一个空格。要使用+,
http://www.example.com/path/test.php?test=2+2
<?php
$test = $_GET['test'];
echo $test;
?>
http://www.example.com/path/test.php?test=2+2
这将打印出2 2- 被解释为URL中的一个空格。要使用
,您需要+
李>%2B
- 被解释为URL中的一个空格。要使用
,您需要+
李>%2B