Update PHP requirement

This commit is contained in:
Pig Fang 2018-07-20 17:32:27 +08:00
parent 0ded695295
commit 201fe21e6d
3 changed files with 10 additions and 11 deletions

View File

@ -48,8 +48,10 @@ Blessing Skin 对您的服务器有一定的要求。_在大多数情况下
- Mbstring - Mbstring
- Tokenizer - Tokenizer
- GD - GD
- XML
如果你使用的是 PHP 7.2,请先阅读 [Wiki - 在 PHP 7.2 上运行](https://github.com/printempw/blessing-skin-server/wiki/%E5%9C%A8-PHP-7.2-%E4%B8%8A%E8%BF%90%E8%A1%8C)。 - Ctype
- JSON
- fileinfo
快速使用 快速使用
----------- -----------

View File

@ -46,9 +46,11 @@ Blessing Skin has only a few system requirements. _In most cases, these PHP exte
- PDO PHP Extension - PDO PHP Extension
- Mbstring PHP Extension - Mbstring PHP Extension
- Tokenizer PHP Extension - Tokenizer PHP Extension
- GD PHP Extension (for generating CAPTCHA) - GD PHP Extension
- XML PHP Extension
If you are using PHP 7.2, you should also apply this [patch](https://github.com/printempw/blessing-skin-server/wiki/%E5%9C%A8-PHP-7.2-%E4%B8%8A%E8%BF%90%E8%A1%8C) after your installation. Just extract the `vendor` folder from the patch, cover the stock `vendor` with that and you are done. - Ctype PHP Extension
- JSON PHP Extension
- fileinfo PHP Extension
Quick Install Quick Install
----------- -----------

View File

@ -321,12 +321,7 @@ class SkinlibController extends Controller
'public' => 'required' 'public' => 'required'
]); ]);
if (extension_loaded('fileinfo')) { $mime = $request->file('file')->getMimeType();
$mime = $request->file('file')->getMimeType();
} else {
$mime = $_FILES['file']['type'];
}
if ($mime != "image/png" && $mime != "image/x-png") { if ($mime != "image/png" && $mime != "image/x-png") {
return json(trans('skinlib.upload.type-error'), 1); return json(trans('skinlib.upload.type-error'), 1);
} }