diff --git a/lib/DirScanner.php b/lib/DirScanner.php index 36a766d..eadfffe 100644 --- a/lib/DirScanner.php +++ b/lib/DirScanner.php @@ -461,7 +461,7 @@ Class DirScanner { if (is_dir($dir)) { if (!preg_match('/\/$/', $dir)) {$dir .= '/';} if (empty($this->rootDir)) { - $this->rootDir = $dir; + $this->rootDir = realpath($dir); } $this->scanningDirLevel = $this->getScanningLevel($this->rootDir, $dir); $nextLevels = $levels - $this->scanningDirLevel; diff --git a/test/DirScannerTest.php b/test/DirScannerTest.php index 350542a..2b314d9 100644 --- a/test/DirScannerTest.php +++ b/test/DirScannerTest.php @@ -68,6 +68,7 @@ $scanner = new DirScannerTest(); //$dirTree = $scanner->scan(__DIR__); $scanner->setWebRoot('/content/'); $dirTree = $scanner->scan(__DIR__ . '/content/', 4); +//$dirTree = $scanner->scan(__DIR__ . '/../www/content/', 4); echo "Time cost: {$scanner->scanTimeCost} ms\n"; echo "\n"; @@ -77,6 +78,7 @@ echo "\n"; $readmeFile = $scanner->getDefaultReadme('favs/'); +//$readmeFile = $scanner->getDefaultReadme(); if (!empty($readmeFile)) { $readme_id = $readmeFile['id']; $readme_titles = $scanner->getMDTitles($readme_id); diff --git a/themes/README.md b/themes/README.md index c6b45ec..1c1f77f 100644 --- a/themes/README.md +++ b/themes/README.md @@ -2,6 +2,7 @@ 此目录结构为: ``` +{皮肤目录名}/controller/{控制器名}/ {皮肤目录名}/views/layout/ {皮肤目录名}/views/{视图目录名}/ ``` @@ -12,6 +13,7 @@ 皮肤名:**night**,默认首页SiteController使用的视图名:**site**, 其目录结构为: ``` -night/views/layout/ -night/views/site/ +night/controller/SiteController.php +night/views/layout/main.php +night/views/site/index.php ``` \ No newline at end of file diff --git a/www/content/README.md b/www/content/README.md index c6e212e..662a35e 100644 --- a/www/content/README.md +++ b/www/content/README.md @@ -1,4 +1,5 @@ # filesite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统 +![Filesite.io - Machete](./machete_icon.png) ## 简介 diff --git a/www/content/machete_icon.png b/www/content/machete_icon.png new file mode 100644 index 0000000..0b7371a Binary files /dev/null and b/www/content/machete_icon.png differ