-1

I have the issue that when I log issues against the website developed by coders on the test website then they are not sure which revision I am currently on.

Now I don't want to make any code change in the main repository for that.

My website is PHP.

Is there any way I can do something in a separate folder, outside www, so that when I load the website some code is inserted automatically on the home page and a revision number gets displayed at the top or bottom?

It can be shell code, PHP code or python script which does that.

Sverri M. Olsen
  • 13,055
  • 3
  • 36
  • 52
user3113427
  • 455
  • 1
  • 6
  • 17
  • 1
    http://stackoverflow.com/questions/1069303/creating-a-file-with-build-number-and-branch-name-in-svn – raj Jan 17 '14 at 01:50

1 Answers1

1

In your main files, have a line that includes another file:

include "version.php"; 

in version.php:

define("VERSION_NUMBER", "2.0.0");

Then, wherever you want to insert your version number that is controlled by a separate file, you can just

<p>Version number: <span><?php echo VERSION_NUMBER; ?></span></p>
rm-vanda
  • 3,122
  • 3
  • 23
  • 34