Home  >  Article  >  Backend Development  >  smarty 如其给模板传值是动态的,生成缓存 也是动态

smarty 如其给模板传值是动态的,生成缓存 也是动态

WBOY
WBOYOriginal
2016-06-13 12:10:38702browse

smarty 如果给模板传值是动态的,生成缓存 也是动态啊
smarty   如果给模板传值是动态的,生成缓存 也是动态啊,,为什么???


例如:$smarty->caching = true;
$smarty->cache_lifetime = 50100;
$showtime=date("YmdHms")
//设置缓存文件名
$smarty->assign("Name","Fred");
$smarty->assign("Time",$showtime);



模板文件接收$showtime    页面刷新后这个值 一直变啊,,,,不是缓存吗??
为什么会变??????
------解决思路----------------------
是的,不会变化。你用低版本的smarty试试看。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Onthink学习漫笔Next article:php 删除cookie有效步骤