Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Include does not show headers and footers

Tags:

include

php

This is my first question on this site.

I am very new to programming.

I have index.html file at C:/Wamp/WWW/AddressBook/Index.html and the header.html and footer.html files are located at C:/Wamp/WWW/AddressBook/Includes/

Now I am trying to include these files in my index.html

For Header

<?php include 'Includes/Header.html'; ?>

and for footer

<?php include 'Includes/Footer.html'; ?>

But none of both header and footer are showing up when i open index.html in my browser.

like image 317
Vishal Avatar asked Feb 16 '23 19:02

Vishal


1 Answers

Do your Apache understand .html as php file?

If not, rename your index.html to index.php.

like image 171
Shikiryu Avatar answered Feb 27 '23 10:02

Shikiryu