urldecode和pluses-PHP
我有一个表单字段,我将查询字符串链接到其中 只要它是URL解码的,它就被清理了,然后我加入了htmlentities,这样它就不会创建有缺陷的HTML 换言之:urldecode和pluses-PHP,php,urldecode,Php,Urldecode,我有一个表单字段,我将查询字符串链接到其中 只要它是URL解码的,它就被清理了,然后我加入了htmlentities,这样它就不会创建有缺陷的HTML 换言之: <input type="text" name="example" value="<?php echo htmlentities((urldecode($_GET["example"])); ?>" /> 已对$\u GET数组中的字符串进行URL解码。你不应该再这样做了 另一方面,如果您真的想在查询字符串中插
<input type="text" name="example" value="<?php echo htmlentities((urldecode($_GET["example"])); ?>" />
已对$\u GET
数组中的字符串进行URL解码。你不应该再这样做了
另一方面,如果您真的想在查询字符串中插入加号,则应该首先对其进行URL编码。$\u GET应该已经为您进行了URL解码。您不需要手动对其进行URL解码。