下载Smarty后,须要将libs下面的内容copy到yaf项目的Smarty目录
yaf项目中对应的是
把稳:在yaf项目的Bootstrap.php文件中须要include干系文件,如图:

在配置文件中须要把稳将所有位置的目录都要做好创建
smarty.template_dir = XXXXX_PATH "/appvsm/views/"smarty.compile_dir = "/data/www/cache/wx.xxxxx.cn/tplCompile/"smarty.cache_dir = "/data/www/cache/wx.xxxxx.cn/tplCache/"smarty.config_dir = XXXXX_PATH "/conf/"smarty.left_delimiter = "<{"smarty.right_delimiter = "}>"smarty.cache_lifetime = 30smarty.caching = false
把稳Adapter.php文件在顶部须要增加引用
<?php/确保Smarty.class.php在Smarty/libs/下/Yaf_Loader::import( "Smarty/Smarty.class.php"); /基类目录为library/class Smarty_Adapter implements Yaf_View_Interface /Smarty_Adapter类为yaf与smarty之间的适配器/
个中Smarty/Smarty.class.php的Smarty是本地项目目录名,这个根据个人情形自行修正