Welcome!

Hello and welcome to Mouth-Shut.info. This website is my personal space on the web! Here I offer high quality goodies for your own website and My Space! I also have my personal blog on the main page, and I would appreciate it if you would comment :) I Hope to see you again here soon!

Statistics

Domain: Mouth-Shut.info
Owner: Kyah
Hosted By: Into Host
Powered By: Cute News
Best Viewed In: Fire Fox

Navigate

For You Lessons Myspace SOTM Kyah Mouth Shut Back Home

Affiliates

Ben Beth
Cammy Cara
Chilli Chloe
Christina Christine
Danica Del
Desiree Emily
Helena Hilde
Ilvie Lea
Lois Lucy
Megan Misha
Nicolette Patricia
Rachel Saachi
Sam Sarah
Shur Sophie
Tori Wendy
be here?

Click!

Be The Best   // [B U I L
T B Y R O B O T S . O R G]

php includes tutorial

home » tutorials » php includes



What is it?

PHP Includes is an easy way to manage your website, it helps you with DIV's and css coding. It allows you to have a header & a footer, like putting something at the bottom of every page without having to actually go and do it on ever page, instead you only have to do it once on one page. Just follow this easy and simple tutorial for PHP Includes.



how to do it

Is PHP Enabled?
»First you should check if PHP is enabled on your server.

NOTE: If your site is a Free Webs/Piczo/Mat Mice PHP is not enabled, there for you can not use PHP Includes

»To check if PHP is enabled make a tester page called something like tester.php (it must end in .php).

»Now paste into the page (remove the *'s) <*? phpinfo(); ?*>

»Then go to your tester page and if lots of information comes up about PHP then PHP is enabled on your server!

»Now convert all of you pages to PHP, by putting .php instead of .html or .htm.


Creating Your Header
»Here is what you paste into your header.php page:
<html> <head> <title>Site Name Here</title> <LINK href="style.css" rel="stylesheet" type="text/css"> </head> <body>



Creating Your Footer
»Here is what you paste into your footer:
</body> </html>


»If you want something to show up on the bottom of every page put it at the top of the footer page.


Adding Includes
»Paste the following code at the top of every page, replace "user" with your FTP username (remove the *'s):
<*? include("/home/user/public_html/header.php"); ?*>


»Paste the following code at the bottom of every page, replace "user" with your FTP username (remove the *'s):
<*? include("/home/user/public_html/footer.php"); ?*>



Did this tutorial help you? If so please link back.
Do not steal this tutorial!
Codes not working? Email me at kyah@mouth-shut.info and remember to send me your codes too, so I can help you.




eXTReMe Tracker