define('DEBUG', false); //todo:线上改为false $module = isset($_GET['module']) ? $_GET['module'] : ''; $action = isset($_GET['action']) ? $_GET['action'] : ''; unset($_GET['module'], $_GET['action']); include './ExpressPHP.Init.php'; $_GET = clear_xss($_GET); //预防XSS攻击 check_xss(); $ForeApps = new ForeAPPS(); $ForeApps->Run($module, $action); unset($ForeApps); function clear_sql_words($w) { if (is_array($w)) { foreach ($w as $k => $v) { $w[$k] = clear_sql_words($v); } } elseif (strlen($w) > 20) { $w = str_ireplace(array('select', 'update', 'create', 'delete', 'replace', 'concat'), array('select', 'update', 'create', 'delete', 'replace', 'concat'), $w); } return $w; } $_GET = clear_sql_words($_GET); $_POST = clear_sql_words($_POST); $_REQUEST = clear_sql_words($_REQUEST);