已经测试 $_SERVER['SERVER_ADDR'] 不可用
以下为使用阿里云SLB获取
$_SESSION['client_ip'] = $data['server']['HTTP_X_FORWARDED_FOR'] ?? $data['server']['HTTP_REMOTEIP'] ?? '127.0.0.1';
谢谢
谢谢