// you’re reading...

PHP Related Links

CakePHP 1.2: redirect method

Previously (in CakePHP 1.1) it was best to add an exit or return after you redirect method like:

$this->redirect('controller/action');
exit();

or

$this->redirect('controller/action');
return();

in CakePHP 1.2 this can be shortened to:

$this->redirect('controller/action', null, true);

See cakebaker on this too.

Tags: ,

Discussion

Comments are disallowed for this post.

  1. Thnx, simple documentation is sometimes hard to find.

    Posted by Dennis | May 22, 2008, 10:15 pm