Welcome Guest, Not a member yet? Register   Sign In
SVN url helper : current_url function added
#1

[eluser]xwero[/eluser]
It's a function i added after a few sites with CI Smile But i'm glad it's a default function now.

I mainly use it for the action attribute of the form tag. But also to build deeper urls so i have a $uri parameter like the site_url function

I have this
Code:
function current_url($uri = '')
{
    if($uri != ''){ $uri = '/'.$uri; }
    $CI =& get_instance();
    return $CI->config->site_url($CI->uri->uri_string().$uri);
}


Messages In This Thread
SVN url helper : current_url function added - by El Forum - 08-20-2008, 02:24 AM
SVN url helper : current_url function added - by El Forum - 08-20-2008, 05:28 AM
SVN url helper : current_url function added - by El Forum - 08-20-2008, 08:09 AM
SVN url helper : current_url function added - by El Forum - 08-26-2008, 03:58 AM
SVN url helper : current_url function added - by El Forum - 09-17-2008, 04:09 AM
SVN url helper : current_url function added - by El Forum - 09-17-2008, 04:45 AM
SVN url helper : current_url function added - by El Forum - 09-18-2008, 02:37 AM
SVN url helper : current_url function added - by El Forum - 09-18-2008, 03:18 AM
SVN url helper : current_url function added - by El Forum - 09-18-2008, 03:28 AM
SVN url helper : current_url function added - by El Forum - 09-18-2008, 10:37 PM
SVN url helper : current_url function added - by El Forum - 09-19-2008, 12:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB