How to configure Smarty to use
This article will explain in detail how to configure and use Smarty. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
The details are as follows:
Download Smarty (take Smarty-2.6.26 as an example here). Extract the downloaded files (the directory structure is quite complex). Next, I will show you an installation example, which should be followed by examples.
(1) create a new directory learn/, in the root directory and a directory smarty/ in learn/. Copy the libs/ of the directory you just unzipped into smarty/, then create a new templates directory in smarty/ and a new cache/,templates/,templates_c/, config/ in templates.
(2) create a new template file: index.tpl, and place this file in the learn/smarty/templates/templates directory with the following code: