. Tpl and. php are learning the smarty framework recently.
Some. tpl files contain html and php code.
What is the difference between. tpl and. php?
(My idea: use. tpl for mixed code such as. php and html for pure php code)
Reply to discussion (solution)
Tpl is the abbreviation of template.
Smarty is a template engine that uses a custom template language to separate the display logic from the business logic (corresponding to the mvc v and M)
The advantage of using the template engine is that when designing the business logic code, you do not need to consider how to display the running results in the future. This makes it possible for the program to keep improving.
When creating a user interface, you don't need to know how the data comes from. you just need to display the data as needed on the interface.
Whether or not the template engine is used, php + html mixed encoding is used.
. Tpl is just a template. no matter what the file ends with, the final running file is. php.
The smarty template engine does this separation. Of course there are other functions.
Wow, the upstairs profile picture is fascinating.