home content tutorials holidays contact ov
This website is here to provide you with the necessities to design & code your own websites, signs, and much more. If you have any questions, message me on facebook! Please do not redistribute or copy anything on this site. Please credit my website when using anything! Thank you for visiting my website! I really hope you enjoy everything I have to offer! ♥
✿ Owner: Kayla
✿ Opened: 06/09/17
✿ Program: Photoshop 2023
✿ Version: 18
✿ Started Sw: 2005ish
✿ Host: Myself
✿ Credits: x

php includes pt2 tutorial

This will teach you how to get the includes to work in directories so you don't have to add the header,footer,style into every directory.

If you do not have your pages split into header, footer, index, and style files than you do not belong here and need to CLICK HERE

The Steps

1. Your header.php, footer.php, index.php, and style.css should be in your public_html already.
Please do not put them in a directory cause that's just so extra lmao

2. On your header.php page, put this coding at the top inside of the < head >:
(DO NOT FORGET THE / THAT GOES BEFORE STYLE.CSS!!!! PEOPLE FORGET IT ALOT AND IT MESSES THE ENTIRE THING UP)


3. This code usually works better on the main index.php page (if it does not work than use the other one):
(click here)

On pages in directories, use this code:
(click here)


PLEASE TAKE NOTE

IF YOU ARE USING A STYLESHEET FROM LOVEBLUSH THAN PAY ATTENTION TO THIS PART
Stylesheets generally do not have a / before the "style.css" because they're in my stylesheet directory.
If the layout is NOT showing up on all your pages than add a / so it goes from href="style.css" to href="/style.css" (see step 2)