public function readFile($path, $file_handle = NULL) { /*{{{*/ return $this->_do_request('GET', $path, NULL, NULL, $file_handle); }
public function getFileContent($filename) { $filename = trim($filename); $config = $this->getConfig(); tsload(ADDON_PATH . '/library/upyun.class.php'); $cloud = new UpYun($config['cloud_attach_bucket'], $config['cloud_attach_admin'], $config['cloud_attach_password']); $cloud->setTimeout(60); $content = $cloud->readFile('/' . $filename); if (!$content) { $this->error = '读取云附件失败!'; return false; } else { return $content; } }