1. Download the smarty template, it’s official
2. Unzip it and you will get a directory like this
Except the libs folder, you can delete the rest (I don’t know what the use is).
3. Create templates, templates_c, cache, and config folders in the current directory. Other names are also acceptable, but the configuration file needs to be modified.
4. Create a folder in the root directory with whatever name you want. Create php file, paste the following code into it.
require_once("libs/smarty.class.php");
$smarty=new smarty();
$smarty->template_dir="templates";//Specify the path to the template file
$smarty->compile_dir ="templates_c";//Specify the compiled file path
$smarty->cache_dir="cache";//Specify the cache file path
$smarty->c c />