【www.bbyears.com--php常用代码】
解决方法:
修改includes/init.php
找到
代码如下if (!empty($_CFG["stylename"]))
{
$smarty->assign("ecs_css_path", "themes/" . $_CFG["template"] . "/style_" . $_CFG["stylename"] . ".css");
}
else
{
$smarty->assign("ecs_css_path", "themes/" . $_CFG["template"] . "/style.css");
}
修改为:
代码如下if (!empty($_CFG["stylename"]))
{
$smarty->assign("ecs_css_path", "themes/" . $_CFG["template"] . "/style_" . $_CFG["stylename"] . ".css?".time());
}
else
{
$smarty->assign("ecs_css_path", "themes/" . $_CFG["template"] . "/style.css?".time());
}
修改后,style.css后面将自动添加时间标识,后台清除缓存都将自动更改这时间标识,达到清除浏览器对css文件的缓存作用。