<?php //<!--包含必须的smarty头文件--> include_once('./class/Smarty.class.php'); $smarty = new smarty(); //创建一个smarty对象 //初始化环境 $smarty->template_dir = './templates/'.$smartytpl; $smarty->compile_dir = './templates_c/'; $smarty->config_dir = './config/'; $smarty->cache_dir = './cache/'; $smarty->caching = false; $smarty->left_delimiter = "{"; $smarty->right_delimiter = "}"; ?>