rules = unserialize($this->request->post('rules', 'a:0:{}', '')); $this->ignore = unserialize($this->request->post('ignore', 'a:0:{}', '')); $this->success('获取文件列表成功!', InstallService::instance($this->app)->getList($this->rules, $this->ignore)); } /** * 读取线上文件数据 */ public function get() { $this->file = $this->app->getRootPath() . decode(input('encode', '0')); file_exists($this->file) ? $this->success('读取文件成功!', [ 'content' => base64_encode(file_get_contents($this->file)), ]) : $this->error('读取文件内容失败!'); } }