Commit d2fc25eb authored by tufengqi's avatar tufengqi

get user ip func mod

parent c470296c
......@@ -7,6 +7,7 @@ use yii\base\Component;
use yii\base\InvalidConfigException;
use yii\web\Response;
use fpf\response\ResponseMsg;
use app\classes\service\basic\CommonService;
class Application extends Component
{
......@@ -123,7 +124,8 @@ class Application extends Component
return;
}
$header_arr = [];
$user_ip = Yii::$app->request->userIP;
$common_service = new CommonService();
$user_ip = $common_service->getUserIp();
$host_name = $_SERVER['SERVER_NAME'];
$is_online_host = $this->isOnlineHost($host_name);
ob_start();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment