diff --git a/application/controllers/cache.php b/application/controllers/cache.php index 6cc027ca..2f7af7dd 100644 --- a/application/controllers/cache.php +++ b/application/controllers/cache.php @@ -151,15 +151,9 @@ class Cache extends CI_Controller { if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')===false) && (strpos($dir, '/amp/')===false) && (strpos($f, '.pdf')===false)) { - $encode_f = mb_detect_encoding($f); - $_f = mb_convert_encoding ($f, 'UTF-8', $encode_f); - $encode_d = mb_detect_encoding($dir); - $_dir = mb_convert_encoding ($dir, 'UTF-8', $encode_d); - echo($encode_f.'@@@'.$encode_d); - - $file_temp = str_replace('/index.htm###', '', $_f.'###'); + $file_temp = str_replace('/index.htm###', '', $f.'###'); $file_temp = str_replace('###', '', $file_temp); - $path_temp = str_replace($this->dir, '', $_dir); + $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")); diff --git a/application/views/cache/update.php b/application/views/cache/update.php index ca6a6603..8b68924c 100644 --- a/application/views/cache/update.php +++ b/application/views/cache/update.php @@ -124,13 +124,16 @@ $(function() {
- $it) { ?> + $it) { + $encode = mb_detect_encoding($it, array('ASCII','UTF-8','GB2312','GBK','BIG5')); + $_it = mb_convert_encoding($it, 'utf-8', $encode); + ?>