|
|
@ -1,7 +1,6 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Class DirScanner |
|
|
|
* Class DirScanner |
|
|
|
* TODO: 兼容windows系统目录结构 |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
Class DirScanner { |
|
|
|
Class DirScanner { |
|
|
@ -21,7 +20,7 @@ Class DirScanner { |
|
|
|
'realpath' => '完整路径', |
|
|
|
'realpath' => '完整路径', |
|
|
|
'path' => '相对网址', |
|
|
|
'path' => '相对网址', |
|
|
|
'extension' => '文件后缀', |
|
|
|
'extension' => '文件后缀', |
|
|
|
'fstat' => '资源状态', //同php方法fstat: https://www.php.net/manual/en/function.fstat.php |
|
|
|
'fstat' => '资源状态', //同php方法fstat: https://www.php.net/manual/en/function.fstat.php |
|
|
|
'content' => 'MD文件内容', |
|
|
|
'content' => 'MD文件内容', |
|
|
|
'shortcut' => 'URL快捷方式', |
|
|
|
'shortcut' => 'URL快捷方式', |
|
|
|
|
|
|
|
|
|
|
@ -44,6 +43,7 @@ Class DirScanner { |
|
|
|
'jpg', //图片 |
|
|
|
'jpg', //图片 |
|
|
|
'jpeg', //图片 |
|
|
|
'jpeg', //图片 |
|
|
|
'png', //图片 |
|
|
|
'png', //图片 |
|
|
|
|
|
|
|
'webp', //图片 |
|
|
|
'gif', //图片 |
|
|
|
'gif', //图片 |
|
|
|
'ico', //图标 |
|
|
|
'ico', //图标 |
|
|
|
'mp4', //视频 |
|
|
|
'mp4', //视频 |
|
|
@ -57,6 +57,7 @@ Class DirScanner { |
|
|
|
'jpg' => 512000, //图片 |
|
|
|
'jpg' => 512000, //图片 |
|
|
|
'jpeg' => 512000, //图片 |
|
|
|
'jpeg' => 512000, //图片 |
|
|
|
'png' => 512000, //图片 |
|
|
|
'png' => 512000, //图片 |
|
|
|
|
|
|
|
'webp' => 512000, //图片 |
|
|
|
'gif' => 512000, //图片 |
|
|
|
'gif' => 512000, //图片 |
|
|
|
'ico' => 51200, //图标 |
|
|
|
'ico' => 51200, //图标 |
|
|
|
'mp4' => 104857600, //视频 |
|
|
|
'mp4' => 104857600, //视频 |
|
|
@ -67,6 +68,7 @@ Class DirScanner { |
|
|
|
'jpg', //图片 |
|
|
|
'jpg', //图片 |
|
|
|
'jpeg', //图片 |
|
|
|
'jpeg', //图片 |
|
|
|
'png', //图片 |
|
|
|
'png', //图片 |
|
|
|
|
|
|
|
'webp', //图片 |
|
|
|
'gif', //图片 |
|
|
|
'gif', //图片 |
|
|
|
'ico', //图标 |
|
|
|
'ico', //图标 |
|
|
|
'mp4', //视频 |
|
|
|
'mp4', //视频 |
|
|
@ -363,6 +365,7 @@ Class DirScanner { |
|
|
|
'jpg' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'jpg' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'jpeg' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'jpeg' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'png' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'png' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
|
|
|
|
'webp' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'gif' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'gif' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'ico' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'ico' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'mp4' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|
'mp4' => "{$webRoot}{$directory}{$filename}.{$extension}", |
|
|
|