function CheckRequest(&$val) { if (is_array($val)) { foreach ($val as $_k => $_v) { CheckRequest($_k); CheckRequest($val[$_k]); } } else { if (strlen($val) > 0 && preg_match('#^(cfg_|GLOBALS)#', $val)) { exit('not allow!'); } } }
function CheckRequest(&$val) { if (is_array($val)) { foreach ($val as $_k=>$_v) { if($_k == 'nvarname') continue; CheckRequest($_k); CheckRequest($val[$_k]); } } else { if( strlen($val)>0 && preg_match('#^(cfg_|GLOBALS|_GET|_POST|_COOKIE)#',$val) ) { exit('Request var not allow!'); } } }