Get Current Url In Codeigniter

[Solved] Get Current Url In Codeigniter | Php - Code Explorer | yomemimo.com
Question : get current url in codeigniter

Answered by : santosh-pal

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

Source : | Last Update : Wed, 10 Mar 21

Answers related to get current url in codeigniter

Code Explorer Popular Question For Php