From 80fd8efe66582a5dede6deb8853bd5fdc2226c2b Mon Sep 17 00:00:00 2001 From: lmrwork <59361885@qq.com> Date: Wed, 14 Mar 2018 11:26:35 +0800 Subject: [PATCH] ignore amp path --- application/controllers/cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/cache.php b/application/controllers/cache.php index c796d501..50c1bdf4 100644 --- a/application/controllers/cache.php +++ b/application/controllers/cache.php @@ -138,14 +138,14 @@ class Cache extends CI_Controller $mydir = dir($dir); while($f = $mydir->read()) { - if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')==false) && (strpos($dir, '/amp/')==false)) + if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')===false) && (strpos($dir, '/amp/')===false)) { $path[] = "$dir/$f"; $this->tree("$dir/$f", $file, $path, $file_time); } else { - if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')==false) && (strpos($f, '.pdf')===false) && (strpos($f, '/amp/')===false) ) + if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')===false) && (strpos($f, '.pdf')===false) && (strpos($f, '/amp/')===false) ) { $file_temp = str_ireplace('/index.htm###', '', $f.'###'); $file_temp = str_ireplace('###', '', $file_temp);