From 008d0607bb92c3a91a95565fbbcce49c53ec9b3e Mon Sep 17 00:00:00 2001 From: LMR <59361885@qq.com> Date: Wed, 27 Jan 2021 18:38:09 +0800 Subject: [PATCH] yes --- application/controllers/cache.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/application/controllers/cache.php b/application/controllers/cache.php index 101a8e3a..e627198d 100644 --- a/application/controllers/cache.php +++ b/application/controllers/cache.php @@ -26,7 +26,7 @@ class Cache extends CI_Controller $this->load->model('Area_model'); $this->load->model('InfoStructures_model'); $this->load->model('Information_model'); - $this->site_code = $this->input->get('site_code') or $this->config->item('site_code'); + $this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code'); } /** @@ -68,7 +68,10 @@ class Cache extends CI_Controller $data['post_para'] = $this->post_para; if ($returnType === 'json') { - echo (json_encode($this->file)); + //print_r($cache_config[$this->site_code]); + //echo('json'); + //print_r($data['file']); + echo (json_encode($data['file'])); } else { //视图 $this->load->view('cache/update', $data); @@ -155,7 +158,11 @@ class Cache extends CI_Controller $url_temp = $this->current_domain . $path_temp . '/' . $file_temp; $url_temp = str_replace('index.htm', '', $url_temp); $file_time[$url_temp] = date("F d Y H:i:s", filemtime("$dir/$f")); - $file[] = $url_temp; + + $encode = mb_detect_encoding($url_temp, array('ASCII', 'GBK', 'ISO-8859-1', 'UTF-8')); + $_url_temp = mb_convert_encoding($url_temp, 'UTF8', $encode); + + $file[] = $_url_temp; } } }