

$page_content = str_replace("!!HEADER!!", file_get_contents("design/header.html"),$page_content) $page_content = file_get_contents("pages/main.html") $page_content = file_get_contents($_REQUEST.".html") Įcho "Page:".$_REQUEST." does not exist! Please check the url and try again!" $page_content = file_get_contents("pages/".$_REQUEST.".html") Now in the root directory create a file and give it the 'index.php'Īdd the following code to your 'index.php' file (don't worry, it will be explained later!): In the "pages" directory, create a page and give it the name: 'main.html' 'header.html', 'footer.html', 'right_column.html', 'left_column.html'Ĭreate another folder and name it "pages" Server/Hosting capable of running php scripts.Ĭreate a folder on your server and name it "design".Ĭreate the following files in the design folder: You can use this tutorial to be the basis to make your website easier to maintain and upgrade.

In this tutorial I will show you how PHP comes to the rescue with only few lines of code.
#Punch professional home design update upgrade
The upgrade process becomes even more irritating when you make a change that needs to be upgraded on every page of your website a good example of such a change is adding a button to the header or changing the copy right information in the footer of your website. Whether you have a small or a huge website, you know how much hassle and time it takes to upgrade your web site pages. Note: Although experienced coders might find some useful information in this tutorial, this tutorial is designed to be easily understood and comprehended by total beginners. Creating a Website Design Templating System Using PHP
