如何阻止PHP在表单中转义撇号


How to stop PHP from escaping apostrophes in a form

我有一个表单,一个输入将包含值:Where something = 'something'

当我回显$_GET(或$_POST)时,它会将其替换为Where something = ''something''

有什么建议吗?

我以为urlencode会进入表单,urldecode会在我回显它时修复它,但我不知道哪里出了问题。谢谢

您需要在php.ini中关闭魔术引号。