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

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

WBOY
Release: 2016-06-13 12:10:38
Original
707 people have browsed it

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


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



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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template