Browse Source

improve code for php 5.5

master
filesite 2 years ago
parent
commit
dde9fbf2a6
  1. 22
      lib/DirScanner.php
  2. 12
      php_extension_install.md

22
lib/DirScanner.php

@ -51,17 +51,17 @@ Class DirScanner {
'm3u8', //视频 'm3u8', //视频
); );
protected $maxReadFilesize = array( //默认每种文件读取内容最大大小 protected $maxReadFilesize = array( //默认每种文件读取内容最大大小
'txt' => 100*1024, //纯文本 'txt' => 102400, //纯文本
'md' => 5*1024*1024, //纯文本 'md' => 5242880, //纯文本
'url' => 20*1024, //快捷方式 'url' => 20480, //快捷方式
'jpg' => 500*1024, //图片 'jpg' => 512000, //图片
'jpeg' => 500*1024, //图片 'jpeg' => 512000, //图片
'png' => 500*1024, //图片 'png' => 512000, //图片
'gif' => 500*1024, //图片 'gif' => 512000, //图片
'ico' => 50*1024, //图标 'ico' => 51200, //图标
'mp4' => 100*1024*1024, //视频 'mp4' => 104857600, //视频
'ts' => 10*1024*1024, //视频 'ts' => 10485760, //视频
'm3u8' => 10*1024*1024, //视频 'm3u8' => 10485760, //视频
); );
protected $securedFileExtensions = array( //开启Nginx防盗链的文件类型 protected $securedFileExtensions = array( //开启Nginx防盗链的文件类型
'jpg', //图片 'jpg', //图片

12
php_extension_install.md

@ -0,0 +1,12 @@
# PHP Extensions needed
* php-mbstring
## install php extensions in docker
```
docker exec -it {container id} sh
apk add php-mbstring
...
```
Loading…
Cancel
Save