Yii difference between rendering functions

后端 未结 3 1417
野的像风
野的像风 2020-12-15 21:47

I sometimes get messed up by the three rendering methods:

  • Controller::render()
  • Controller::renderPartial()
  • Co
3条回答
  •  醉梦人生
    2020-12-15 22:24

    render() is commonly used to render a view that corresponds to what a user sees as a "page" in your application. It first renders the view you have specified and then renders the layout for the current controller action (if applicable), placing the result of the first render into the layout. It then performs output processing (which at this time means automatically inserting any necessary

提交回复
热议问题