I have moved my footer contents in my website to a separate file named footer.php
as this repeats throughout all the pages.
footer.php
<?php
echo "<footer class="footer">
<div class="container">
<p class="text-muted"><a href="contactus.html">Contact Us</a></p>
<p class="text-muted"> Copyright © <span id="yearfooter"> </span>. All rights reserved.</p>
</div>
</footer>";
?>
I have included the footer.php
into my index.html using <?php include 'footer.php';?>
I have also created a .htaccess file with the following:
.htaccess
AddType application/x-httpd-php .html
But, the footer is not being displayed in my index.html page. When I inspect the index.html page using firebug, I can see the php include I've give commented <!--?php include 'footer.php';?-->
. I did not comment it in my index.html file. This is my first day using php and appreciate any help.
UPDATE
footer.php
<?php
echo '<footer class="footer">
<div class="container">
<p class="text-muted"><a href="contactus.html">Contact Us</a></p>
<p class="text-muted"> Copyright © <span id="yearfooter"> </span>. All rights reserved.</p>
</div>
</footer>';
?>
Update
I've managed to get this working. There was some config issues in my php5.conf file. Removed the config I added and its working great now.