From 495a1b9b8b17571a030a08e79f6d9bbdf3b7886b Mon Sep 17 00:00:00 2001 From: tensent Date: Sat, 11 Apr 2020 13:22:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/Upload.php b/app/controller/Upload.php index d52e4de8..2d3d4642 100644 --- a/app/controller/Upload.php +++ b/app/controller/Upload.php @@ -82,7 +82,7 @@ class Upload extends Base { public function upload(){ $type = $this->request->param('type'); - $upload_type = (false !== strpos("image", $type)) ? "image" : 'file'; + $upload_type = (false !== strpos($type, "image")) ? "image" : 'file'; $config = $this->$upload_type(); // 获取表单上传文件 例如上传了001.jpg $file = $this->request->file('file');