<!-- --><!-- --><style type="text/css">@import url(http://www.blogger.com/static/v1/v-css/navbar/697174003-classic.css); div.b-mobile {display:none;} </style> </head><body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=20981690469561729&amp;blogName=Neo-Faerie+Wings%3A+Your+source+for+hig...&a mp;publishMode=PUBLISH_MODE_BLOGSPOT&amp;navbarType=BLACK&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fneo-faeriewings. blogspot.com%2Fsearch&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fneo-faeriewings.blogspot.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div> Neo-Faerie Wings: Your source for high quality neopets graphics: PHP Includes

May 14, 2010

PHP Includes

PHP includes is a very important tool in updating your weblayouts easily. It is very similar to Server Side Includes, the only difference is, using PHP includes will enable you to use other PHP scripts/snippets.

The first thing you need to do is to code your layout the ordinary HTML way. Then divide your layout into 3 parts. The header, content, and footer parts. The header shall contain all your codes before the contents of the page, and the footer shall include the codes after the contents of the page.

On your index.php page put the following code:
<? include("header.php") ?>


PUT YOUR CONTENTS HERE!


<? include("footer.php")?>

To create a new page just put the contents between the header code and footer code. It's just that simple. Don't forget to save your files with a .php extension!

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home