7
出于某种原因,我无法让Smarty停止缓存模板,这在开发过程中对模板进行更改时非常烦人。谁能告诉我,我要去哪里错了禁用所有缓存?:禁用PHP Smarty模板引擎上的缓存?
$smarty = new Smarty();
$smarty->template_dir = SMARTY_PATH."/templates";
$smarty->compile_dir = SMARTY_PATH."/templates_c";
$smarty->cache_dir = SMARTY_PATH."/cache";
$smarty->config_dir = SMARTY_PATH."/configs";
$smarty->cache_lifetime = 1;
$smarty->caching = 0;
完美的,由于某种原因,我从来没有注意到说明书中的$强迫编译选项。谢谢! – Rob 2010-07-17 13:22:30
不客气:-)玩得开心! – 2010-07-17 13:26:39