1、在ecs_shop_config表中插入一条数据


进入ECSHOP后台-数据库管理-SQL查询


复制下面SQL,粘贴到里面执行。注意这时是默认表前缀ecs_,如果你的修改过要和你的统一了。

INSERT INTO `ecs_shop_config` VALUES (65535, 10, 'last_clear_time', 'text', '', '', '1274090777', 1);

 

 



注:65535 这个值也是可以改的,但是不建议少于1000 如果少于1000,可能对其他值会产生影响。

 

2、找到includes/init.php 这个文件在文件的最后增加下面的代码:

if (is_temps())


{

    clear_all_files();

    $sql="update ".$ecs->table('shop_config') ."set value=".time()." where code='"."last_clear_time '";

     $db->query($sql);

}

function is_temps()

{

    if(time()-$_CFG['last_clear_time']<10000)

    {

        return(false);

    }

    else

    {

        return(true);

    }

} 

 

 

相关文章:

  • 2021-12-02
  • 2021-11-17
  • 2021-07-29
  • 2022-12-23
  • 2022-03-06
  • 2022-01-05
  • 2021-11-21
猜你喜欢
  • 2022-01-23
  • 2021-08-25
  • 2021-09-12
  • 2022-12-23
  • 2021-06-08
  • 2021-12-01
  • 2022-02-07
相关资源
相似解决方案