From .html to .php
Let's change the '.html' file to the '.php' file.
We'll cover the following
Converting index.html into index.php
Now that we have _header.php
and _footer.php
, it will be very easy to change the layout of the entire website.
When we make a change to any of these files, it will be picked up on every page because every page includes these two files.
For instance, adding a navigation bar to the page will be very easy.
We will do that in the next lesson, but first, we need to make sure that every page includes these two snippets.
If you have done all that work in Bootstrapping, you may have noticed that currently, only the index page doesn’t use _header.php
and _footer.php
.
That’s because this page is a .html
file and not a .php
file.
The solution is to rename index.html
to index.php
and include
those snippets in the right places:
Get hands-on with 1400+ tech skills courses.