In CI v3, you can try:
function partial_uri($start = 0) {
return join('/',array_slice(get_instance()->uri->segment_array(), $start));
}
This will drop the number of URL segments specified by the $start
argument. If your URL is http://localhost/dropbox/derrek/shopredux/ahahaha/hihihi
, then:
partial_uri(3); # returns "ahahaha/hihihi"