Answers for "get base url codeigniter"

1

get current url in codeigniter

simple get like this

echo $this->input->get('my_id');
Load the URL helper To get current url

$currentURL = current_url(); //http://myhost/main

$params   = $_SERVER['QUERY_STRING']; //my_id=1,3

$fullURL = $currentURL . '?' . $params; 

echo $fullURL;   //http://myhost/main?my_id=1,3
Posted by: Guest on March-03-2021
0

codeigniter base_url

$this->load->helper('url');
Posted by: Guest on March-06-2020

Browse Popular Code Answers by Language