CodeIgniter Forums

Full Version: Update CI url_helper "current_url" Remove /Index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]harman[/eluser]
Code:
if ( ! function_exists('current_url'))
{
    function current_url()
    {
        $CI =& get_instance();
        $removeIndex=str_replace("/".$CI->config->item('index_page'),"",$CI->config->site_url($CI->uri->uri_string()));
        return $removeIndex;
    }
}