Classicamiga Forum Retro Edition
Thread: Website advice wanted
Harrison 02:44 1st August 2012
Here is the next example. This is a quick demo site I'm knocked up for you to take a look at to show you how to create your site using a template and php.

It's templated, so all pages load from a single template. It is fully xhtml and css coded. The layout uses purely div tags for page layout/position, with all formatting done in a css file. The different parts of the page that are static across the site are held within the template files directory so editing one element of the page is easy, and doesn't require editing the main index.php file where the whole page structure is stored.

Finally, the actual content for each page is stored in the pages directory, so page content can easily be edited without altering the actual site.

Fairly straight forward, and you will see it doesn't take much code to create. It is very basic with the only error checking being to see if a variable is set in the url for the page to load, and if it doesn't it automatically loads the home page. A lot more can be done in this regard, such as checking to see if a page set in the URL actually exists on the server, so that visitors can't break the site by typing whatever they wish into the url string.

To load the site place the whole contents of the zip file into your server's www and then load the index.php file.

Any questions, just ask.
Attached: example_site.zip (3.2 KB)
[Reply]
Tags:Array
Up