📅  最后修改于: 2022-03-11 14:54:25.736000             🧑  作者: Mango
This should help :
http://www.codeigniter.com/user_guide/libraries/user_agent.html
$this->load->library('user_agent');
if ($this->agent->is_referral()){
echo $this->agent->referrer();
}
or straight PHP:
redirect($_SERVER['HTTP_REFERER']);