In mvc, does the control layer publish data to the view layer based on the include template page? in mvc, does the control layer publish data to the view layer based on the include template page? share: more -- in mvc, does the principle of publishing data to the view layer include the template page?
In mvc, does the principle of publishing data to the view layer include the template page?
Share: More
------ Solution --------------------
Data include to view layer?
The "include template" is actually available.
------ Solution --------------------
It can be understood that the content of the template file should be replaced with the PHP code according to certain rules.
------ Solution --------------------
In fact, it can be understood as a php file that completes logic processing (here is the include you mentioned) and then the following shows that mvc is for a clearer point.
------ Solution --------------------
In mvc, does the principle of publishing data to the view layer include the template page?
This statement is problematic.
Yes
In mvc, the control layer transfers the data generated by the model layer to the view layer.
Include is only one of the possible actions, not the principle.
The view layer can use templates or not
------ Solution --------------------
You can try the template engine to separate the php syntax and associate the template name and action in the naming convention directory specification.