From bb29ac3cb75b01c79be6b1ec419475778beda1bb Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Sat, 29 Sep 2018 10:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/view/widget/images.php | 2 +- extend/service/UploadService.php | 2 +- index.php | 2 ++ public/index.php | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/application/admin/view/widget/images.php b/application/admin/view/widget/images.php index 1084e759..afa0c266 100644 --- a/application/admin/view/widget/images.php +++ b/application/admin/view/widget/images.php @@ -77,7 +77,7 @@ {volist name="list" id="vo"}
- +
{/volist} diff --git a/extend/service/UploadService.php b/extend/service/UploadService.php index ed30d726..1aac2723 100644 --- a/extend/service/UploadService.php +++ b/extend/service/UploadService.php @@ -163,7 +163,7 @@ class UploadService $fileName = basename($filePath); $savePath = $dir.DS.$pre.$fileName; $img->thumb($width,$height)->save($savePath); - $savePath = str_replace(ROOT_PATH.'public','',$savePath); + $savePath = str_replace(ROOT_PATH.'public/uploads','',$savePath); return ltrim($savePath,'.'); } } \ No newline at end of file diff --git a/index.php b/index.php index 615d71bd..ba58f4fa 100644 --- a/index.php +++ b/index.php @@ -25,5 +25,7 @@ if(file_exists("./public/install/") && !file_exists("./public/install/install.lo define('APP_PATH', __DIR__ . '/application/'); //静态文件目录 define('PUBILC_PATH', '/public/'); +//上传文件目录 +define('UPLOAD_PATH', '/public/uploads'); // 加载框架引导文件 require __DIR__ . '/thinkphp/start.php'; diff --git a/public/index.php b/public/index.php index 61a0dff5..e792aca8 100644 --- a/public/index.php +++ b/public/index.php @@ -25,5 +25,7 @@ if(file_exists("./install/") && !file_exists("./install/install.lock")){ define('APP_PATH', __DIR__ . '/../application/'); //静态文件目录 define('PUBILC_PATH', '/'); +//上传文件目录 +define('UPLOAD_PATH', '/uploads'); // 加载框架引导文件 require __DIR__ . '/../thinkphp/start.php';