PHP Introduction
PHP includes may seem very difficult to understand at first but once you get the hang of it, they will simplify your life like anything ever could! lol! Once you learn PHP including, you can do the following things with your website: » Make it more organized. » Change layouts with ease. » Add cool PHP scripts. » Add same text/content to many pages with ease. » Skin your site! Though skinning is another big thing, which will need more tutorials and lots of patience.
PHP Includes
First of all, code a layout for your site with normal HTML like you always do. For startes lets assume you are using a Div-Layers layout, Your typical coding will be something like this:
|
<html> <head> <title>Your Site Title </title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body bgcolor="#FFFFFF"> <table cellspacing="0" cellpadding="0" border="0" > <tr> <td><img src="image.jpg"></td> </tr> </table> <div style="position: absolute; top: 185; left: 403; width: 147; text-align: justify;"> <div class="head">NAVIGATION</div> <p> <center> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> </center> </div> <div style="position: absolute; top: 380; left: 8; width: 380; text-align: justify;"> <div class="head"> MAIN CONTENTS</div> <p> Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog </p> </div> </table> </body> </html> |
|
<html> <head> <title>Your Site Title </title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body bgcolor="#FFFFFF"> <table cellspacing="0" cellpadding="0" border="0" > <tr> <td><img src="image.jpg"></td> </tr> </table> <div style="position: absolute; top: 185; left: 403; width: 147; text-align: justify;"> <div class="head">NAVIGATION</div> <p> <center> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> » <a href="#">Link</a> » </br> </center> </div> <div style="position: absolute; top: 380; left: 8; width: 380; text-align: justify;"> |
|
<div class="head"> MAIN CONTENTS</div> <p> Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog Blog </p> </div> </table> </body> </html> |
| <? include("/home/user/public_html/folder/header.php"); ?> <? include("/home/user/public_html/folder/footer.php"); ?> |
| <? include("/home/bunny/public_html/hop/header.php"); ?> <? include("/home/bunny/public_html/hop/footer.php"); ?> |





