app); $this->rules = unserialize($this->request->post('rules', 'a:0:{}', '')); $this->ignore = unserialize($this->request->post('ignore', 'a:0:{}', '')); $this->success('获取当前文件列表成功!', $extend->buildFileList($this->rules, $this->ignore)); } /** * 读取线上文件数据 * @param string $encode */ public function get($encode) { $this->file = dirname($this->app->getAppPath()) . '/' . decode($encode); if (file_exists($this->file)) { $this->success('读取文件成功!', [ 'format' => 'base64', 'content' => base64_encode(file_get_contents($this->file)), ]); } else { $this->error('获取文件内容失败!'); } } }