system = System::getSystem(); } //验证图片上传 public function checkImage($image) { $ext = str_replace(',', ',', $this->system['img_type']); $size = $this->system['img_size'] * 1024 * 1024; $this->rule = [ 'image' => [ 'fileExt' => $ext, 'fileSize' => (int)$size ] ]; return $this->check(['image' => $image]); } //验证视频上传 public function checkVideo($video) { $ext = str_replace(',', ',', $this->system['video_type']); $size = $this->system['video_size'] * 1024 * 1024; $this->rule = [ 'video' => [ 'fileExt' => $ext, 'fileSize' => (int)$size ] ]; return $this->check(['video' => $video]); } //验证文件上传 public function checkFile($file) { $ext = str_replace(',', ',', $this->system['file_type']); $size = $this->system['file_size'] * 1024 * 1024; $this->rule = [ 'file' => [ 'fileExt' => $ext, 'fileSize' => (int)$size ] ]; return $this->check(['file' => $file]); } }