日期:2014-05-17 浏览次数:20482 次
cmmon.inc.php
--------------------begin---------------------
?
?
foreach(array('_COOKIE', '_POST', '_GET','data') as $_request)
{
? foreach($$_request as $_key => $_value)
? {
? ? $key{0} != '_' && $$_key = daddslashes($_value);
? }
}
?
?
function daddslashes($string, $force = 0)?
{
? !defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
? if(!MAGIC_QUOTES_GPC || $force)?
? {
? ? if(is_array($string))?
? ? {
? ? ? foreach($string as $key => $val)?
? ? ? {
? ? ? ? $string[$key] = daddslashes($val, $force);
? ? ? }
? ? }?
? ? else?
? ? {
? ? ? $string = addslashes($string);
? ? }
? }
? return $string;
}
?