Php 如何在表单提交期间删除URL中的特殊字符

Php 如何在表单提交期间删除URL中的特殊字符,php,forms,submission,Php,Forms,Submission,我试图在PHP中删除表单提交过程中的特殊字符。每次我想提交数据时,例如: <form action="?" method="get"> <input type="text" name="str" value="I want to remove this" /> </form> 我们是否可以在提交前或提交过程中去掉这些“+” 我的预期结果是 http://localhost/?str=I want to remove this 感谢您的帮助…在url中,服务

我试图在PHP中删除表单提交过程中的特殊字符。每次我想提交数据时,例如:

<form action="?" method="get">
<input type="text" name="str" value="I want to remove this" />
</form>
我们是否可以在提交前或提交过程中去掉这些“+”

我的预期结果是

http://localhost/?str=I want to remove this

感谢您的帮助…

在url中,服务器端不能有空白

str=I+want+to+remove+this 
将被解读为

str=I want to remove this
只是。所以我认为你真的不需要担心这种编码

str=I want to remove this