Understanding MVC Views in PHP

后端 未结 7 663
生来不讨喜
生来不讨喜 2020-11-22 10:45

I have to seem problems grasping the concept of Views in MVC, they are, according to what I\'ve read, the layer that manages the presentation in the aplication, but many of

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 11:04

    When the browser calls a page, a controller will be loaded for this one. The controller manages the lifecycle of your app. He'll grab data from the model, which is only used to get data (maybe from a database). The View is only HTML, the controller will echo the view, and if neccessary, pass a few parameters to it.

提交回复
热议问题