作者 lyh

gx

@@ -79,14 +79,13 @@ class FileController @@ -79,14 +79,13 @@ class FileController
79 * @time :2023/6/17 16:32 79 * @time :2023/6/17 16:32
80 */ 80 */
81 public function upload() { 81 public function upload() {
82 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入', true) . PHP_EOL, FILE_APPEND);  
83 $this->request->validate([ 82 $this->request->validate([
84 'file'=>['required'], 83 'file'=>['required'],
85 ],[ 84 ],[
86 'file.required'=>'必须填写', 85 'file.required'=>'必须填写',
87 ]); 86 ]);
88 $files = $this->request->file('file'); 87 $files = $this->request->file('file');
89 - 88 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入111', true) . PHP_EOL, FILE_APPEND);
90 if (empty($files)) { 89 if (empty($files)) {
91 $this->response('没有上传的文件!'); 90 $this->response('没有上传的文件!');
92 } 91 }
@@ -95,6 +94,7 @@ class FileController @@ -95,6 +94,7 @@ class FileController
95 if ($type == 'multi') { 94 if ($type == 'multi') {
96 return $this->multi($files); 95 return $this->multi($files);
97 } else { 96 } else {
  97 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入333', true) . PHP_EOL, FILE_APPEND);
98 return $this->single($files); 98 return $this->single($files);
99 } 99 }
100 } 100 }
@@ -310,6 +310,7 @@ class FileController @@ -310,6 +310,7 @@ class FileController
310 public function setUrl(){ 310 public function setUrl(){
311 //A端上传 311 //A端上传
312 if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){ 312 if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
  313 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入222', true) . PHP_EOL, FILE_APPEND);
313 $this->path = $this->uploads['path_a'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m'); 314 $this->path = $this->uploads['path_a'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m');
314 }else{ 315 }else{
315 //B端上传,upload_method 为 1时 强制上传到本地 316 //B端上传,upload_method 为 1时 强制上传到本地