Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Friday, January 3, 2014

How to Create a PHP Website Template from Scratch

Back to Creating a PHP web site - Starting from scratch  or NEXT  chapter
=======================================================
Here ,  creating a PHP website template starting with HTML and CSS.
(CSS & HTML sessions will follow....)


Two methods I am explaining here.

  1. Manually create a site using DreamWeaver
  2. Downloading a template and editing 
Now , let us have a look at each one of this in detail.....

Manually create a site using DreamWeaver

Lessons - 1

Setting up the File structure and Folders

Step - 1 : Create a folder named php_site
Step - 2 : Inside of this folder we are now going to create two new files. One is index.html and the other file is style.css .

To do this , open dream weaver .
We can see ,







** : You can see a create new option.From below , choose HTML or PHP . Then a file will open in Dream Weaver . Save the file as index.html (inside the folder php_site ) .


** : Close the file , again select CSS from create new option.And save that file as style.css (inside the folder php_site ) .


Step - 3 : Now we are going to create two more folders inside the folder php_site . The first folder is going to be named includes, and the second folder will be named variables.

See the picture :

Step - 4 :    In the folder named variables , create a blank file called variables.php .
For that , again open Dream Weaver , select PHP from the start-up box (as given above) .


That is , in the folder  variables , we can see a file called variables.php .




Step - 5 : 
Then go into the other folder we created called includes and create the following files:
  • header.php
  • nav.php
  • sidebar.php
  • footer.php
For that , again open Dream Weaver , select PHP from the start-up box , 4 times.

header.php


footer.php



Like this , create nav and sidebar also.


That is , in the folder  includes, we can see 4 files , as;



Now , refer Setting up Code for the file PHP template .

Lot of options are there to study, but I am restricting this area , and moving to the next point , as this is more easy for a normal user.

PHP Downloading a template and editing