Tried URI::uri_string() but can\'t get it to work with the base_url.
URL: http://localhost/dropbox/derrek/shopredux/ahahaha/hihihi Returns: dr
http://localhost/dropbox/derrek/shopredux/ahahaha/hihihi
dr
//if you want to get parameter from url use: parse_str($_SERVER['QUERY_STRING'], $_GET); //then you can use: if(isset($_GET["par"])){ echo $_GET["par"]; } //if you want to get current page url use: $current_url = current_url();