current_url (): Returns the full URL (including segments) of the page being currently viewed.
current_url () through we can get the current URL in your Codeigniter. But, you must load the "URL" helper before using current_url (). You can load the URL helper:
then I can print or echo the current_url (); let's see in the following code example:
<?php $this->load->helper('url'); $currentURL = current_url(); print_r($currentURL);
Loading, please wait...