我改变了函数名称,但仍然得到这个不能重新声明geting_Ip()(之前在C:\ xampp \ htdocs中声明)

时间:2016-09-28 17:08:38

标签: php

function geting_Ip() {
    $ip = $_SERVER['REMOTE_ADDR'];

    if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
        $ip = $_SERVER['HTTP_CLIENT_IP'];
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    }

    return $ip;
}

0 个答案:

没有答案