I Have this code that should display the current revision on my web-page. I ran it over my linux-server through php index.php
. The code worked fine. It the HTML codes and showed the revision. But when i tried to visit my web-page through my web-browser(google-chrome 40). It doesn't show the revision.
<?php
$revision = substr(shell_exec('git rev-parse origin/master'),0,7);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test - shell_exec</title>
</head>
<body>
<footer class="footer">
<p>Revision <?php echo $revision; ?></p>
</footer>
</body>
</html>