当用户更改语言时,我需要删除缓存,但收到错误消息。
$smarty = new Smarty;
//$smarty->force_compile = true;
$smarty->debugging = true;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
if (isset($_COOKIE['country']))
{
$country = $_COOKIE['country'];
$language = "eng";
if ($country == "NO"){
$language = "nor";
$smarty->clear_all_cache();
}
}
当我使用clear_assign时,我也会收到此消息:
function call 'clear_assign' is unknown or deprecated
最佳答案
如果您最近将 Smarty 升级到版本 3.x.x 更改了一些方法名称
在您的情况下,“clear_assign”更改为“clearAssign”
关于php - 函数调用 'clear_all_cache' 和 'clear_assign' 未知或已弃用。聪明的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3269667/