Home >Backend Development >PHP Tutorial >PHP:get方式中包含括号(),结果被过滤了

PHP:get方式中包含括号(),结果被过滤了

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:41:222021browse

在开发的时候,部分发往服务器的数据中包含有小括号(),结果在服务器端发现括号都被过滤掉了。
比如:
test.php

<code><?php echo $_GET['msg'];
</code></code>

使用:http://127.0.0.1/test.php?msg=()
IE,火狐,Chrome的输出结果均为空。
请问该如何解决?

回复内容:

在开发的时候,部分发往服务器的数据中包含有小括号(),结果在服务器端发现括号都被过滤掉了。
比如:
test.php

<code><?php echo $_GET['msg'];
</code></code>

使用:http://127.0.0.1/test.php?msg=()
IE,火狐,Chrome的输出结果均为空。
请问该如何解决?

通过URL传参记得urlencode一下..

查看form 的enctype属性 W3cSchool

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn