时间:2021-07-01 10:21:17 帮助过:8人阅读
代码如下:
php if($_SERVER['HTTP_CLIENT_IP']){ $onlineip=$_SERVER['HTTP_CLIENT_IP']; }elseif($_SERVER['HTTP_X_FORWARDED_FOR']){ $onlineip=$_SERVER['HTTP_X_FORWARDED_FOR']; }else{ $onlineip=$_SERVER['REMOTE_ADDR']; } /* 何问起 hovertree.com */ echo $onlineip; ?>
推荐:http://www.cnblogs.com/roucheng/p/phpexcel.html
http://www.bkjia.com/PHPjc/1130142.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1130142.htmlTechArticlephp 获取当前用户的IP,php当前用户ip 代码如下: ? php if ( $_SERVER ['HTTP_CLIENT_IP' ]){ $onlineip = $_SERVER ['HTTP_CLIENT_IP' ];} elseif ( $_SERVER ['HTTP_X_FORW...