从外部服务器获取svn修订号

时间:2016-06-15 11:33:27

标签: php svn

有没有办法访问安装了svn的url来从外部php获取修订号:

<?php
    $url="the url where the svn is installed";
    $Revisionsvn=(some command to get the revision number through the url);
    echo($Revisionsvn);
?>

我试过了

<?php
$url = 'your repository here';
$output = `svn info $url`;
echo "<pre>$output</pre>";
?>

1 个答案:

答案 0 :(得分:0)

您应该可以使用以下命令:

svn info http://SVN_PATH_TO_REPO

它会给你带来什么?

另请查看以下链接是否有帮助: Running SVN commands from PHP using exec, shell_exec, or system