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;