一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

ecshop清除缓存css样式不起作用解决办法

时间:2016-07-12 编辑:简简单单 来源:一聚教程网

解决方法:

修改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文件的缓存作用。

热门栏目