Update PHP requirement
This commit is contained in:
parent
0ded695295
commit
201fe21e6d
@ -48,8 +48,10 @@ Blessing Skin 对您的服务器有一定的要求。_在大多数情况下,
|
||||
- Mbstring
|
||||
- Tokenizer
|
||||
- GD
|
||||
|
||||
如果你使用的是 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)。
|
||||
- XML
|
||||
- Ctype
|
||||
- JSON
|
||||
- fileinfo
|
||||
|
||||
快速使用
|
||||
-----------
|
||||
|
@ -46,9 +46,11 @@ Blessing Skin has only a few system requirements. _In most cases, these PHP exte
|
||||
- PDO PHP Extension
|
||||
- Mbstring PHP Extension
|
||||
- Tokenizer PHP Extension
|
||||
- GD PHP Extension (for generating CAPTCHA)
|
||||
|
||||
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.
|
||||
- GD PHP Extension
|
||||
- XML PHP Extension
|
||||
- Ctype PHP Extension
|
||||
- JSON PHP Extension
|
||||
- fileinfo PHP Extension
|
||||
|
||||
Quick Install
|
||||
-----------
|
||||
|
@ -321,12 +321,7 @@ class SkinlibController extends Controller
|
||||
'public' => 'required'
|
||||
]);
|
||||
|
||||
if (extension_loaded('fileinfo')) {
|
||||
$mime = $request->file('file')->getMimeType();
|
||||
} else {
|
||||
$mime = $_FILES['file']['type'];
|
||||
}
|
||||
|
||||
$mime = $request->file('file')->getMimeType();
|
||||
if ($mime != "image/png" && $mime != "image/x-png") {
|
||||
return json(trans('skinlib.upload.type-error'), 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user