Answers for "redirect route codeigniter"

PHP
2

redirect in codeigniter

//You can use redirect in codeigniter by loading helper 'url'
$this->load->helper('url');

//The redirects functions accepts two parameters to execute the function first is 'Location Url' and second parameter allows the developer to use different HTTP commands to perform the redirect "location" or "refresh".
if (!$user_logged_in)
{
  redirect('/account/login', 'refresh');
}
Posted by: Guest on June-04-2020
2

codeigniter redirect

$this->load->helper('url');
redirect('/account/login', 'refresh');
Posted by: Guest on April-24-2020
0

redirect to site url codeigniter 4

return redirect()->to(site_url()); //worked!
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language