First of all identify the file(s) for which you want to know the revision number from PHP.首先找出所有文件( ) ,其中你想知道的修订版号从PHP 。 Then add a property to the file as follows:然后添加一个属性文件如下:
svn propset svn:keywords Revision file_name.php svn propset svn :关键字修订file_name.php

Now add the following function within php blocks:现在,添加以下功能的PHP模块:

 /** Returns revision number */ function getSCID() {     $svnid = '$Rev: 43 $';     $scid = substr($svnid, 6);     return intval(substr($scid, 0, strlen($scid) - 2)); } / **回报修订编号* /功能getscid ( ) (元svnid = ' $冯智活: 43元;元的SCID = substr ( $ svnid , 6 ) ;返回intval ( substr ( $ SCID鼠, 0 , strlen (美元的SCID ) -2 ) ) ; ) 

You can now access the revision number of this file from PHP by calling getSCID().现在,您可以访问的修订版号这个档案从PHP致电getscid ( ) 。 It returns an integer.它返回一个整数。

Note: Revision numbers are essential in writing upgrade scripts注:修订版号是必不可少的,在写作的升级脚本