How does the control layer in MVC publish the data to the view layer by the Include template page?
How does the control layer in MVC publish the data to the view layer by the Include template page?
share to: more
------Solution--------------------
Data include to the view layer?
The "Include template" is there.
------Solution--------------------
You can understand that the contents of the template file are replaced with PHP code according to certain rules.
------Solution--------------------
In fact, it can be understood as a PHP file above the logical processing (this is what you say include) and then the following shows MVC is to be clearer
------Solution--------------------
How does the control layer in MVC publish the data to the view layer by the Include template page?
There is a problem with this statement.
Should be said to be
In MVC, the control layer transfers the data from the model layer to the view layer.
Include is just one of the possible actions, not the principle.
The view layer can use a template, or you can not use the
------Solution--------------------
You can try the template engine, which will separate the PHP syntax and associate the template name with the action in the Naming specification directory specification