Home >Backend Development >PHP Tutorial >s.m.art exhibition Smarty installation and configuration method

s.m.art exhibition Smarty installation and configuration method

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:37:521275browse

Download the latest Smarty: http://smarty.php.net/
The latest version: 2.6.18
After unzipping, rename the libs directory in the directory to smarty, copy it to your website directory, and at the same time in the website root directory Create two directories, templates and templates_c
Create test.php with the following content:
include_once('./Smarty/Smarty.class.php');$smarty = new Smarty();
$smarty -> ; template_dir = "./templates"; //Template storage directory
$smarty -> compile_dir = "./templates_c"; //Compile directory
$smarty -> left_delimiter = "{{"; //Left delimiter Symbol
$smarty -> right_delimiter = "}}"; //Right delimiter
$smarty -> assign('test','OK');
$smarty -> display('test.html' ;

Open test.php. If you see OK, it means your smarty installation is successful!

The above introduces the installation and configuration method of s.m.art exhibition Smarty, including the content of s.m.art exhibition. I hope it will be helpful to friends who are interested in PHP tutorials.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn