First of all identify the file(s) for which you want to know the revision number from PHP. اولا وقبل كل شيء تحديد الملف (الملفات) التي تريد ان تعرف عدد من تنقيح بي. اتش. بى. Then add a property to the file as follows: ثم تضاف الى ملف الممتلكات على النحو التالي :
svn propset svn:keywords Revision file_name.php propset SVN SVN : تنقيح الكلمات الرئيسية file_name.php

Now add the following function within php blocks: الآن ، يضاف ما يلي ، تعمل ضمن كتل بي. اتش. بى :

 /** 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(). يمكنك الان الوصول الى عدد من تنقيح هذا الملف من بي. اتش. بى عن طريق الاتصال بالهاتف getscid (). It returns an integer. وتعود صحيحا.

Note: Revision numbers are essential in writing upgrade scripts ملاحظه : من الضروري اعادة النظر في الارقام في كتابه ترقية برمجيه