Welcome Guest, Not a member yet? Register   Sign In
current_url() and HTTPS?
#3

[eluser]jeffpeck[/eluser]
I used $_SERVER['HTTPS'], and your substr parameters were correct. Thanks.

Code:
function current_url()
    {
        $CI =& get_instance();
        $url = $CI->config->site_url($CI->uri->uri_string());
        
        if ($_SERVER['HTTPS'] == 'on')
            $url = substr($url, 0, 4).'s'.substr($url, 4);
            
        return $url;
    }


Messages In This Thread
current_url() and HTTPS? - by El Forum - 05-14-2009, 12:14 PM
current_url() and HTTPS? - by El Forum - 05-14-2009, 12:46 PM
current_url() and HTTPS? - by El Forum - 05-14-2009, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB