使用插件block 法 在Smarty/plugins目录下建一个文件block.nocache.php 内容如下: <?php
function smarty_block_nocache($param, $content, $smarty)
{
return $content;
}
?>在模板中(smarty已经配置成功): {nocache}
不缓存的内容,如:{$smarty.now}
{/nocache} 按照上面的配置,nocache块包含的内容应该是时时更新的
为什么在mvc模式下使用时,不能时时更新呢?
function smarty_block_nocache($param, $content, $smarty)
{
return $content;
}
?>在模板中(smarty已经配置成功): {nocache}
不缓存的内容,如:{$smarty.now}
{/nocache} 按照上面的配置,nocache块包含的内容应该是时时更新的
为什么在mvc模式下使用时,不能时时更新呢?
这样问题解决,谢谢大家