Create a controller class file in the module's controller directory.
Related recommendations: "ThinkPHP Tutorial"
Write the controller file.
Continue to improve the controller and add a method.
Render the template in the method.
Location of template file:
View the printing of a simple template written.
The above is the detailed content of How to use templates in thinkphp. For more information, please follow other related articles on the PHP Chinese website!