The function parse_str() (http://us3.php.net/manual/en/function.parse-str.php) is also affected by magic_quotes_gpc, so if that function is called anywhere, stripslashes_deep won't be sufficient by itself.
关闭魔术引号magic_quotes_gpc 指令只能在系统级关闭,不能在运行时。也就是说不能用 ini_set()。
为了能写出移植性较强的代码(可以运行于任何环境),例如不能修改服务器配置的情况,下面的例子可以在运行时关闭 magic_quotes_gpc。但是这样做比较低效,适当的修改配置才是更好的办法。
add a note
User Contributed Notes
rdk
09-Sep-2006 02:44
The function parse_str() (http://us3.php.net/manual/en/function.parse-str.php) is also affected by magic_quotes_gpc, so if that function is called anywhere, stripslashes_deep won't be sufficient by itself.
dedlfix
20-Aug-2006 08:18
The function stripslashes_deep() ignores slashes in the keys | |||||