欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 function getIp() { if($_SERVER['HTTP_CLIENT_IP']) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif ($_SERVER['HTTP_X_FORWARDED_FOR']) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
function getIp() {
if($_SERVER['HTTP_CLIENT_IP']) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif ($_SERVER['HTTP_X_FORWARDED_FOR']) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
}