diff --git a/application/controllers/cache.php b/application/controllers/cache.php index a92a435f..2f7af7dd 100644 --- a/application/controllers/cache.php +++ b/application/controllers/cache.php @@ -52,6 +52,10 @@ class Cache extends CI_Controller $this->post_para = $current_cache_config['cache_api_para']; //遍历缓存文件夹 $this->tree($this->dir, $this->file, $this->path, $this->file_time); + //print_r($this->file); + //print_r($this->path); + //print_r($this->file_time); + //die(); //按目录筛选结果 $this->filter($this->file, $this->path); @@ -147,10 +151,11 @@ class Cache extends CI_Controller { if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')===false) && (strpos($dir, '/amp/')===false) && (strpos($f, '.pdf')===false)) { - $file_temp = str_ireplace('/index.htm###', '', $f.'###'); - $file_temp = str_ireplace('###', '', $file_temp); - $path_temp = str_ireplace($this->dir, '', $dir); + $file_temp = str_replace('/index.htm###', '', $f.'###'); + $file_temp = str_replace('###', '', $file_temp); + $path_temp = str_replace($this->dir, '', $dir); $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; } diff --git a/application/views/cache/update.php b/application/views/cache/update.php index 61595611..59785963 100644 --- a/application/views/cache/update.php +++ b/application/views/cache/update.php @@ -2,7 +2,7 @@ 更新静态页-v1.0a - + @@ -42,7 +42,7 @@ $(function() { var current = dom.eq(star); if (current.length) { var file = current.find('.file').attr('title'); - file = encodeURI(file); + //file = encodeURI(file); current.find('.msg_wait').css('color','red').html('更新中'); $.ajax({ url : '', @@ -124,13 +124,16 @@ $(function() { - $it) { ?> + $it) { + $encode = mb_detect_encoding($it, array('ASCII','GBK','ISO-8859-1','UTF-8')); + $_it = mb_convert_encoding($it, 'UTF8', $encode); + ?> - 100) { ?> - .......... + 100) { ?> + .......... - + 无操作