/** * 生成最新版本号 */ private static function genLatestRevision() { $cmd = 'cd ' . C('SRC.SRC_PATH') . ' && ' . C('SVN') . ' info --xml'; $info = shell_exec_ensure($cmd, false); if (!$info['status']) { $info = $info['output']; $info = simplexml_load_string($info); $revision = $info->entry->commit->attributes()->revision; self::$revision = (int) $revision; } }