⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Get url



rteranm
  • profile picture
  • Member

Posted 24 November 2012 - 22:04 PM

It has saved me many things, I hope it helps

$url=$this->uri->uri_string();
$accesos = explode("/", $url);
$cantidad=count($accesos);
$url2=$accesos[3];

echo $accesos[0]; //// ci_inici
echo $accesos[1]; //// fnc_ingre_medid
echo $accesos[2]; //// edit
echo $accesos[3]; //// 27

the url is :

http://10.1.1.5/crud/ci_inici/fnc_ingre_medid/edit/27