1. Download the smarty package
Content
2. Create a directory to store your project
The path under XAMPP is:
3. Upload the libs directory in the smarty package to the project directory.
Create a new "Smarty" directory under the project directory, and then set the libs content:
Secret to the "Smarty" directory.
4. Modify the php. ini file
Append at the end of the file:
Export de_path = ".; C: \ XAMPP \ PHP \ smarty \ Libs"
(The Path depends on your actual situation)
5. Test
The content in the demo in the downloaded smarty package
Upload All files to the new project, and then change the require path in the index. php file to the following path.
Require 'smarty/smarty. Class. php ';
In the browser address bar, enter:
Http: // localhost/testsmarty/index. php
The demo is displayed as follows:
------------------------------------------------------------------------------
The tutorial is complete! Pai_^