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

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

WBOY
WBOYOriginal
2016-06-13 11:22:35716browse

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


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



模板文件接收$showtime    页面刷新后这个值 一直变啊,,,,不是缓存吗??
为什么会变??????

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