function inject_check($sql_str) { //防止注入
$check = eregi('select|insert|update|delete|'|/*|*|../|./|union|into|load_file|outfile', $sql_str);
if ($check) {
echo "输入非法注入内容!";
exit ();
} else {
return $sql_str;
}
}
function checkurl() { //检查来路
if (preg_replace("/https?://([^:/]+).*/i", "1", $_SERVER['HTTP_REFERER']) !== preg_replace("/([^:]+).*/", "1", $_SERVER['HTTP_HOST'])) {
header("Location: http://www.111com.net");
exit();
}
}
|