📜  在 codeigniter 中获取当前 url - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:29.693000             🧑  作者: Mango

代码示例1
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