From 2ae4db19ef7c275b199436d025dbce7e53abb3e2 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Fri, 8 Sep 2023 16:44:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=A4=AA=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/RotationChart.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controller/RotationChart.php b/app/controller/RotationChart.php index 1a83125..77029e7 100644 --- a/app/controller/RotationChart.php +++ b/app/controller/RotationChart.php @@ -111,20 +111,20 @@ class RotationChart extends BaseController try { $rule = [ 'image' => [ - 'fileSize:10240', // 文件大小不超过10M (10 * 1024 KB) + 'fileSize:10240000', // 文件大小不超过10M (10 * 1024 KB) 'fileExt:jpeg,jpg,png,gif', // 文件后缀只允许jpeg,png,jpg,gif - function ($value) { - // 验证图片宽度在350 - list($width, $height) = getimagesize($value->getPathName()); - - if ($width < 345 || $width > 355) { - return '图片宽度不能小于345,且不能大于355像素'; - } - if ($height < 145 || $height > 155) { - return '图片高度不能小于145,且不能大于155像素'; - } - return true; - } +// function ($value) { +// // 验证图片宽度在350 +// list($width, $height) = getimagesize($value->getPathName()); +// +// if ($width < 345 || $width > 355) { +// return '图片宽度不能小于345,且不能大于355像素'; +// } +// if ($height < 145 || $height > 155) { +// return '图片高度不能小于145,且不能大于155像素'; +// } +// return true; +// } ] ]; validate($rule)->check($file);