Warning : array_merge() [ function.array-merge ]: Argument#1 is not an array in /home/www/cwcity/hosting/j/2/3333/htdocs/wap/include/check.php on line 36
Warning : Invalid argument suppliedfor foreach() in /home/www/cwcity/hosting/j/2/3333/htdocs/wap/include/check.php on line 47
check.php是这样
<?php
//要过滤的非法字符
$ArrFiltrate=array("and","update","insert","delete","from","asc","drop","mid","%","like","or");
$arr_str=array(
'and' => 'a-nd',
'update'=>'up-date',
'insert'=>'in-sert',
'delete'=>'de-lete',
'from' => 'fr-om',
'asc' => 'asc-',
'drop' => 'dr-op',
'mid' => 'm-id',
'%' => '百分号',
'like' => 'li-ke',
'or' => 'o-r'
);
//出错后要跳转的url,不填则默认前一页
$StrGoUrl="xinwe.cn";
//是否存在数组中的值
function FunStringExist($StrFiltrate,$ArrFiltrate){
foreach ($ArrFiltrate as$key=>$value){
if (eregi($value,$StrFiltrate)){
return true;
}
}
return false;
}
//合并$_POST 和 $_GET
if(function_exists(array_merge)){
$ArrPostAndGet=array_merge($HTTP_POST_VARS,$HTTP_GET_VARS);
}else{
foreach($HTTP_POST_VARS as$key=>$value){
$ArrPostAndGet[]=$value;
}
foreach($HTTP_GET_VARS as$key=>$value){
$ArrPostAndGet[]=$value;
}
}
//验证开始
foreach($ArrPostAndGet as$key=>$value){
if (FunStringExist($value,$ArrFiltrate)){
/* //----替换
foreach($HTTP_POST_VARS as$keypost=>$valuepost){
foreach($arr_str as$key1=>$value1){
$_POST[$keypost]=str_ireplace('$key1','$value1',$HTTP_POST_VARS[$keypost]);
echo $key1;
echo" $value1
";
}
}
foreach($HTTP_GET_VARS as$keyget=>$valueget){
foreach($arr_str as$key1=>$value1){
$_GET[$keyget]=str_ireplace('$key1','$value1',$HTTP_GET_VARS[$keyget]);
echo"$_GET[$keyget] . ";
echo $key1;
echo" $value1
";
}
}
*/
echo "<p>请不要尝试黑本站谢谢!
<a href='
http://leguu.cn'>
http://leguu.cn</a></p>";
if (empty($StrGoUrl)){
echo "错误</p>";
}else{
echo $StrGoUrl;
}
exit;
}
}
?>这应该怎么改
$ar=$arr=$arrr=array();