继续收藏一些PHP常用函数第1/2页
复制代码 代码如下: <? function GetIP() { //获取IP if ($_SERVER[“HTTP_X_FORWARDED_FOR”]) $ip = $_SERVER[“HTTP_X_FORWARDED_FOR”]; else if ($_SERVER[“HTTP_CLIENT_IP”]) $ip = $_SERVER[“HTTP_CLIENT_IP”]; else if ($_SERVER[“REMOTE_ADDR”]) $ip = $_SERVER[“REMOTE_ADDR”]; else if (getenv(“HTTP_X_FORWARDED_FOR”)) $i
用户评论