KItis KItis - 1 month ago 5x
PHP Question

What is the difference between $this->render() and $this->redirect()

I am new to the Yii framework and I would like to know the difference between


Both can be used to retrieve a given page.


It looks like they do quite different things:

  • ->redirect($url, ...)
    redirect does a HTTP page redirect. Does not directly render a page.

  • ->render($view, ...)
    render outputs the named view. Does not terminate the current PHP request.