首頁 >後端開發 >php教程 >magic_quotes_gpc有关问题

magic_quotes_gpc有关问题

WBOY
WBOY原創
2016-06-13 10:09:37944瀏覽

magic_quotes_gpc问题
我的php.ini文件里面的magic_quotes_gpc是打开的,
magic_quotes_gpc = On;另外magic_quotes_runtime = Off和magic_quotes_sybase = Off,
但是页面post传值的时候却不会自动转义。
纠结了,
真不知道怎么会出现这种事。
求过往的大神们指教。

------解决方案--------------------
你的web环境是什么样的?还有你可以在程序端试试看看。
------解决方案--------------------
修改后重启apache了吗
------解决方案--------------------
magic_quotes_gpc boolean
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
------解决方案--------------------
php5.0以下是受magic_quotes_gpc选项影响的,当magic_quotes_gpc选项为ON时,该数组中的元字符等内容就会做转义处理,为OFF时,用户的提交就会不做任何处理,直接送到数组中。
http://blog.csdn.net/zhangjjjc/article/details/7248955

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn