ThinkPHP supports a variety of php template engines, which can be configured according to personal needs.
Let's take the Smarty template engine as an example to explain the specific operation process!
First go to the Smarty official website to download a Smarty. Download address of this website: http://www.jb51.net/codes/16086.html.
Next, unzip the compressed package and there will be two folders: demo and libs. Open the libs folder and copy all contents.
Next, open the thinkphp folder in the root directory of your website. There is a vendor folder inside. This folder is used by TP to call third-party libraries. Paste all the things you just copied.
Then open the configuration file of your project, which should be the file conf.php in the conf directory of your project directory.
Add the following configuration:
'TMPL_ENGINE_TYPE'=>'Smarty'
If you want to configure more, you can also add
'TMPL_ENGINE_CONFIG'=>array( 'caching'=>true, 'template_dir'=>TMPL_PATH, 'compile_dir'=>CACHE_PATH, 'cache_dir'=>TEMP_PATH )
This way you can use Smarty templates.
The file location of the template has not changed, nor has the cache location.