前台
 1 //清除缓存
 2 $(function(){
 3     $("#cache").click(function(){
 4         layer.confirm('你确定要清除缓存吗?', {icon: 3, title:'提示'}, function(index){                   
 5             $.getJSON("{:U('Sys/clearRuntime')}",function(data){
 6                 if(data.status == 1){
 7                     layer.msg(data.info,{icon:1});
 8                     
 9                 }else{
10                     layer.msg(data.info,{icon:4});
11                 }
12         
13             });
14             layer.close(index);
15         })
16     });      
17 });
后台
1 //删除缓存
2 public function clearRuntime() 
3 {          
4     delFileByDir(APP_PATH.'Runtime/'); 
5     $this->success('删除缓存成功!');
6 }

 

相关文章:

  • 2021-11-21
  • 2021-11-21
  • 2021-11-02
  • 2021-11-02
  • 2021-11-30
  • 2021-09-30
  • 2021-08-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-08-08
  • 2021-11-21
  • 2021-11-21
相关资源
相似解决方案