PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
philas
Forum Newbie
Posts: 2 Joined: Sun Jan 23, 2011 6:21 am
Post
by philas » Sun Jan 23, 2011 6:24 am
i'm use smarty 3 and write
Code: Select all
$smarty = new Smarty();
$smarty->config_dir='./smarty/sconfigs/';
$smarty->template_dir='./templates/new/';
$smarty->compile_dir='./smarty/stemplates_c/';
$smarty->cache_dir='./smarty/scache/';
if(!$smarty->isCached('index.tpl','default')) {
$smarty->assign("u",refresh_user_info(),true);
}
$smarty->display('index.tpl','default');
but {$u} is missing when i add if($smarty->isCached
help please!
Peec
Forum Commoner
Posts: 33 Joined: Fri Feb 22, 2008 3:58 am
Post
by Peec » Sun Jan 23, 2011 4:17 pm
You would properly need to delete the cached version of the tpl file in /smarty/scache/
It might already have been cached, and this is why you will not get {$u} , because it's already cached and it just jumps to display.
philas
Forum Newbie
Posts: 2 Joined: Sun Jan 23, 2011 6:21 am
Post
by philas » Sun Jan 23, 2011 10:39 pm
i tried to delete all smarty cache before test. did not help