ecshop清除缓存css样式不起作用解决办法
发布时间:2019-12-16 11:14:02作者:admin点击:
解决方法:
修改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文件的缓存作用。
- 上一篇 : phpcms当前网页高亮(也包括单网页)
- 下一篇 : dedecms织梦手机站跳转模板设置例子