首页 > 其他 > 详细

smarty配置文件

时间:2014-12-07 23:16:36      阅读:373      评论:0      收藏:0      [点我收藏+]
<?php
 include_once("smarty/Smarty.class.php");
 $smarty=new Smarty();
 $smarty->caching=true;/*开启缓存*/
 $smarty->template_dir="./templates";/*缓存的路径*/
 $smarty->compile_dir="./templates_c";/*编译的目录*/
 $smarty->cache_dir="./smarty_cache";/*缓存的目录*/
 $smarty->left_delimiter="{";/*定义左边的*/
 $smarty->right_delimiter='}';/*定义右边的*/
 $smarty->cache_lifetime=600;/*缓存的时间*/
/*$smarty->display('cache.tpl',cache_id);缓存一个页面,生成id
$smarty->clear_all_cache();清除所有的缓存
$smarty->clear_cache('index.html');清除一个页面
$smarty->clear_cache('index.html',cache_id);清除一个固定id的缓存*/
?>

smarty配置文件

原文:http://blog.csdn.net/dapeng0112/article/details/41791933

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!