How To Get Subversion Revision ID From PHP Comment obtenir la subversion ID de révision de PHP
First of all identify the file(s) for which you want to know the revision number from PHP. Tout d'abord identifier les fichier (s) pour qui vous voulez connaître le numéro de révision de PHP. Then add a property to the file as follows: Puis ajouter une propriété au dossier comme suit:
svn propset svn:keywords Revision file_name.php svn propset svn: keywords révision file_name.php
Now add the following function within php blocks: Maintenant, ajoutez la fonction suivante au sein de blocs php:
/** Returns revision number */ function getSCID() { $svnid = '$Rev: 43 $'; $scid = substr($svnid, 6); return intval(substr($scid, 0, strlen($scid) - 2)); } / ** Retourne numéro de révision * / function getSCID () ($ svnid = '$ Rev: 43 $' $ Scid = substr ($ svnid, 6); retour intval (substr ($ Scid, 0, strlen ($ SCID) -- 2));) You can now access the revision number of this file from PHP by calling getSCID(). Vous pouvez maintenant accéder au numéro de révision de ce fichier de PHP en appelant getSCID (). It returns an integer. Elle renvoie un entier.
Note: Revision numbers are essential in writing upgrade scripts Note: les numéros de révision sont essentiels pour l'écriture scripts de mise à jour
Filed under Classé sous Headline News Headline News , Open Source Software Open Source Software , PHP , Technology Technologie | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | cet article |
Email this Article Envoyer cet article
You may also like to read Vous mai également à lire |




