<?php
define('SMARTY_DIR','Smarty/');//定义模板文件夹路径
require(SMARTY_DIR.'libs/Smarty.class.php');//引入模板类文件
class mySmarty extends Smarty{
function mySmarty(){
$this->template_dir = SMARTY_DIR.'demo/templates/';
$this->compile_dir = SMARTY_DIR.'demo/templates_c/';
$this->config_dir = SMARTY_DIR.'demo/configs/';
$this->cache_dir = SMARTY_DIR.'demo/cache/';
$this->left_delimiter = '<{';
$this->right_delimiter = '}>';
$this->caching = true;
}
}
$mySmarty = new mySmarty();
?>