From 42b1393819dd52eb947486d12eebc5aef45fcc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98=E6=A0=91?= Date: Wed, 16 Dec 2020 16:24:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tools/controller/File.php | 8 +------- config/filesystem.php | 2 +- public/uploads/.gitignore | 0 public/uploads/keti/keti.xlsx | Bin public/uploads/rongyu_teacher/404.png | Bin public/uploads/rongyu_teacher/js_rongyu.xlsx | Bin public/uploads/student/student_template.xlsx | Bin public/uploads/teacher/TeacherInfo.xlsx | Bin 8 files changed, 2 insertions(+), 8 deletions(-) mode change 100644 => 100755 public/uploads/.gitignore mode change 100644 => 100755 public/uploads/keti/keti.xlsx mode change 100644 => 100755 public/uploads/rongyu_teacher/404.png mode change 100644 => 100755 public/uploads/rongyu_teacher/js_rongyu.xlsx mode change 100644 => 100755 public/uploads/student/student_template.xlsx mode change 100644 => 100755 public/uploads/teacher/TeacherInfo.xlsx diff --git a/app/tools/controller/File.php b/app/tools/controller/File.php index 12fb4116..55e6d8db 100644 --- a/app/tools/controller/File.php +++ b/app/tools/controller/File.php @@ -67,13 +67,7 @@ class File extends BaseController $savename = \think\facade\Filesystem::disk('public') ->putFile($list['serurl'], $file); - $fengefu = DIRECTORY_SEPARATOR; - $fengefu_fan = '/'; - - // 重新组合文件路径 - $savename = str_replace($fengefu_fan, $fengefu, $savename); - - if($isSave==true){ + if( $isSave == true) { $list['url'] = $savename; $list['newname'] = substr($savename ,strripos($savename, $fengefu) + 1 diff --git a/config/filesystem.php b/config/filesystem.php index dc1914d3..c7e19b44 100644 --- a/config/filesystem.php +++ b/config/filesystem.php @@ -15,7 +15,7 @@ return [ // 磁盘类型 'type' => 'local', // 磁盘路径 - 'root' => app()->getRootPath() . 'public\uploads', + 'root' => app()->getRootPath() . "public/uploads", // 磁盘路径对应的外部URL路径 'url' => '/uploads', // 可见性 diff --git a/public/uploads/.gitignore b/public/uploads/.gitignore old mode 100644 new mode 100755 diff --git a/public/uploads/keti/keti.xlsx b/public/uploads/keti/keti.xlsx old mode 100644 new mode 100755 diff --git a/public/uploads/rongyu_teacher/404.png b/public/uploads/rongyu_teacher/404.png old mode 100644 new mode 100755 diff --git a/public/uploads/rongyu_teacher/js_rongyu.xlsx b/public/uploads/rongyu_teacher/js_rongyu.xlsx old mode 100644 new mode 100755 diff --git a/public/uploads/student/student_template.xlsx b/public/uploads/student/student_template.xlsx old mode 100644 new mode 100755 diff --git a/public/uploads/teacher/TeacherInfo.xlsx b/public/uploads/teacher/TeacherInfo.xlsx old mode 100644 new mode 100755