PHP Include

In this first tutorial we will start with a basic php include linking to a .html file. In my experience I use this type of include for the head content (excluding the title so we can a have unique title on each page) the navigation and the footer. This allows me to easily change things in these areas without having to update a lot of pages.

 

To do a php include all you need to do is insert this in your document:

 

<? include(”path/to/file.html”); ?>

 

This will then include the contents of the linked in the webpage, you can then easily update that area by change the path/to/file.html file.

More on includes will be coming soon!

If you enjoyed this post you might enjoy these:

One Comment to “PHP Include”

#1 Posted by zibex (21.01.09 at 23:35 )

DkBwAs hi! nice site!