发布于 3年前

PHP判断是否为本地开发环境

function is_local_env(){
    $request = Request::instance();
    $domain = $request->domain();

    if(strpos($domain,'192.168.') !== false  || strpos($domain,'127.0.0.1') !== false  || strpos($domain,'localhost') !== false)  {
        return true;
    }else{
        return false;
    }
}
©2020 edoou.com   京ICP备16001874号-3