From 29ddcbb7b2ebcb27aab97c0a8fe456d426873100 Mon Sep 17 00:00:00 2001 From: "admin-PC\\Administrator" <136327134@qq.com> Date: Mon, 15 Oct 2018 11:20:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=93=8D=E4=BD=9C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=85=BC=E5=AE=B9=E5=9B=BE=E7=89=87=E8=A3=81=E5=89=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/service/UploadService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extend/service/UploadService.php b/extend/service/UploadService.php index 46657c42..9c44943c 100644 --- a/extend/service/UploadService.php +++ b/extend/service/UploadService.php @@ -159,7 +159,9 @@ class UploadService */ public static function thumb($filePath, $ratio=5, $pre='s_') { - $filePath = ltrim($filePath,'/'); + $uname=php_uname('s'); + if(strstr($uname,'Windows')!==false) $filePath = ltrim($filePath,'\\'); + else $filePath = ltrim($filePath,'/'); $img = self::openImage($filePath); $width = $img->width() * $ratio / 10; $height = $img->height() * $ratio / 10;