mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
fix getip()
This commit is contained in:
@@ -67,7 +67,8 @@ function getip($real = true) {
|
||||
$ip = getenv('REMOTE_ADDR') ?? '';
|
||||
}
|
||||
}
|
||||
if ($real) {
|
||||
$ip = trim(trim($ip), ",");
|
||||
if ($real && str_contains($ip, ",")) {
|
||||
return strstr($ip, ",", true);
|
||||
}
|
||||
return $ip;
|
||||
|
||||
Reference in New Issue
Block a user