我的php.ini文件里面的magic_quotes_gpc是打开的,
magic_quotes_gpc = On;另外magic_quotes_runtime = Off和magic_quotes_sybase = Off,
但是页面post传值的时候却不会自动转义。
纠结了,
真不知道怎么会出现这种事。
求过往的大神们指教。
magic_quotes_gpc = On;另外magic_quotes_runtime = Off和magic_quotes_sybase = Off,
但是页面post传值的时候却不会自动转义。
纠结了,
真不知道怎么会出现这种事。
求过往的大神们指教。
Warning
自 PHP 5.3.0 起,已经废弃此特性。强烈建议不要应用此特性 。Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically.Note:In PHP 4, also $_ENV variables are escaped.Note:If the magic_quotes_sybase directive is also ON it will completely override magic_quotes_gpc. Having both directives enabled means only single quotes are escaped as ''. Double quotes, backslashes and NUL's will remain untouched and unescaped.See also get_magic_quotes_gpc()magic_quotes_runtime boolean
http://blog.csdn.net/zhangjjjc/article/details/7248955
我承认,我的问题有问题,
我的magic_quotes_gpc是打开的,
而且,传递的值也是转义过了的,
但是我在接受传值的页面使用
echo "<script type=\"text/javascript\">window.alert('".$_POST['***']."');</script>";
弹出框显示的传值是没经过转义的,
不知道这是为什么。
是我没搞清楚,
对不起。