关于文件缓存的bug

浏览:442 发布日期:2015/07/08
3.2.3 - 普通 - 未处理
文件缓存开启子目录缓存,开启子目录级别后,无法使用clear清除缓存文件    public function clear() {
        $path   =  $this->options['temp'];
        $files  =   scandir($path);
        if($files){
            foreach($files as $file){
                if ($file != '.' && $file != '..' && is_dir($path.$file) ){
                    array_map( 'unlink', glob( $path.$file.'/*.*' ) );
                }elseif(is_file($path.$file)){
                    unlink( $path . $file );
                }
            }
            return true;
        }
        return false;
    }
评论(
后面还有条评论,点击查看>>