diff --git a/framework/helper.class.php b/framework/helper.class.php index 300d328578..c7c9d631a7 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -439,3 +439,14 @@ function a($var) print_r($var); echo ""; } + +/** + * Judge the server ip is local or not. + * + * @access public + * @return void + */ +function isLocalIP() +{ + return !filter_var($_SERVER['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE); +}