header("Location: " ... MY_Controller |
[eluser]Nick_MyShuitings[/eluser]
A warning to the wise that has cost me an absurd amount of debugging time. I run a modified version of Jamie's My_controller for autoloading of views and layouts Quote: * @package CodeIgniter Code: header("Location: " . $payPalURL); It appears (and my quick tests now show) that using the header in that format will allow the rendering of the subsequent layout and views, and then redirect you. That said, there are a thousand ways to avoid this with restructuring for this specific case... but the point is to be careful with header location. Using codeigniter redirect function works like a charm and redirects without processing the rest of the layouts and views. This code is bad: Code: public function test() { versus this better code: Code: public function test() { |
Welcome Guest, Not a member yet? Register Sign In |