Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the refresh parameter in CodeIgniter redirect function

Could sombody please tell me why do we need to use a "refresh" parameter for redirect function in codeigniter.

redirect('/index.php/it_inventory/get_users', 'refresh');
like image 647
Reza Saberi Avatar asked Mar 21 '26 03:03

Reza Saberi


1 Answers

If you are familiar with core PHP header("Location:url_here") so this might be a new addition in your knowledge that redirection using header with the following syntax is also possible which is used in CI. When you pass the second argument refresh so the follow line works. And its optional. header("Refresh:0;url=".$uri)

like image 84
WordPress Mechanic Avatar answered Mar 23 '26 21:03

WordPress Mechanic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!