smarty安装步骤:
1,从官网可以下载Smarty-2.6.26.zip到本机
2,解压Smarty-2.6.26.zip
3,从Smarty-2.6.26目录中找到libs目录,将它复制到php根目录下,并改名为smarty
4,在smarty目录里新建4个目录,分别为templates、templates_c、configs和cache
(注:smarty目录下现有子目录:
目录解释:
libs:
internals-----内部函数目录
plugins-------外部插件目录
--------------------------------
demo:
cache---------模板缓存目录
configs-------config文件目录
templates-----模板目录
templates_c---编译目录
)
将php文件放在smarty文件夹下,html放在templates文件夹下,执行php文件。