Posted in PHP onOctober 31, 2012
<?php $magic_quotes_gpc = get_magic_quotes_gpc(); @extract(daddslashes($_COOKIE)); @extract(daddslashes($_POST)); @extract(daddslashes($_GET)); if(!$magic_quotes_gpc) { $_FILES = daddslashes($_FILES); }
daddslashes函数
//转译字符函数 function daddslashes($string) { if(!is_array($string)) return addslashes($string); foreach($string as $key => $val) $string[$key] = daddslashes($val); return $string; } ?>
PHP5下$_SERVER变量不再受magic_quotes_gpc保护的弥补方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@