//APPPATH是入口文件定义的application的目录
require(APPPATH.'libraries/smarty/Smarty.class.php');
class Cismarty extends Smarty {
/**
* 构造函数
*
* @access public
* @param array/string $template_dir
* @return obj smarty obj
*/
function __construct()
{
parent::__construct();
// $this->Smarty();
//ROOT是Codeigniter在入口文件index.php定义的本web应用的根目录
//在入口文件中加入define('ROOT', dirname(__FILE__);
$this->template_dir = ROOT . '/template';
$this->compile_dir = ROOT . '/template_c';
$this->config_dir = ROOT . '/config';
$this->cache_dir = ROOT . '/cache';
}
}