/** * 初始化docx */ public function actionInit() { if (empty($this->_config['git'])) { throw new Exception('请先在Config.php中配置文档保存到的git ssh地址:)'); } $git = new Command(); $ret = $git->initGit($this->_config['git']); if ($ret) { $this->redirect('/'); } else { throw new Exception('初始化git文档目录失败:', var_export(join("<br>", $git->getExeLog()), true)); } }
/** * 初始化docx */ public function actionInit() { $git = new Command(); $ret = $git->initGit($this->_config['git'], dirname(__FILE__), static::MARKDOWN_ROOT); if ($ret) { $this->redirect('/'); } else { throw new Exception('初始化git文档目录失败:', var_export(join("<br>", $git->getExeLog()), true)); } }