toxic

备忘录

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
if(!get_magic_quotes_gpc()) { 
$_GET = daddslashes($_GET); 
$_POST = daddslashes($_POST); 
$_COOKIE = daddslashes($_COOKIE); 
$_FILES = daddslashes($_FILES); 
} 
function daddslashes($string, $force = 1) { 
if(is_array($string)) { 
foreach($string as $key => $val) { 
unset($string[$key]); 
$string[addslashes($key)] = daddslashes($val, $force); 
} 
} else { 
$string = addslashes($string); 
} 
return $string; 
} 
posted on 2012-10-30 10:12  toxic  阅读(243)  评论(0编辑  收藏  举报