public function initAllBlogData($postPath, $enableCache = false) { $this->blogs = array(); $this->tags = array(); $this->categorys = array(); $this->yearMonths = array(); $this->enableCache = $enableCache; $this->baseurl = preg_replace('/^(http|https):\\/\\/[^\\/]*?(\\/.*)$/', '\\2', base_url("")); //先读缓存 if (!$this->globalDataCacheRead()) { //列出所有文件,可能包含非markdown文件 $mdfiles = get_dir_file_info($postPath, FALSE); $this->readAllPostInfo($mdfiles, $postPath); } }