'Local', 2 => 'Qiniu', 3 => 'Oss', ); public function get($config) { $save = $this->config[$config['type']] ?? false; if (!$save) { Dever::error('存储位置错误'); } $tool = 'Upload\\Lib\\Tool\\' . $save; $tool = new $tool($config); return $tool; } }