|
|
|
@ -39,13 +39,14 @@ class Cache extends CI_Controller
|
|
|
|
|
*/
|
|
|
|
|
public function update()
|
|
|
|
|
{
|
|
|
|
|
$returnType = $this->input->get('type');
|
|
|
|
|
//设置缓存文件文件夹
|
|
|
|
|
$cache_config = $this->config->item('cache');
|
|
|
|
|
$current_cache_config = $cache_config[$this->site_code];
|
|
|
|
|
$this->dir = $current_cache_config['cache_path'];
|
|
|
|
|
|
|
|
|
|
//设置当前站点
|
|
|
|
|
$this->current_domain = $this->config->item('site_url');
|
|
|
|
|
$this->current_domain = $current_cache_config['site_url']; //$this->config->item('site_url');
|
|
|
|
|
//echo $this->config->item('site_url');
|
|
|
|
|
//设置缓存更新接口及POST参数
|
|
|
|
|
$this->cache_api = $current_cache_config['cache_api'];
|
|
|
|
@ -66,8 +67,12 @@ class Cache extends CI_Controller
|
|
|
|
|
$data['cache_api'] = $this->cache_api;
|
|
|
|
|
$data['post_para'] = $this->post_para;
|
|
|
|
|
|
|
|
|
|
//视图
|
|
|
|
|
$this->load->view('cache/update', $data);
|
|
|
|
|
if ($returnType === 'json') {
|
|
|
|
|
echo (json_encode($this->file));
|
|
|
|
|
} else {
|
|
|
|
|
//视图
|
|
|
|
|
$this->load->view('cache/update', $data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|