Friends at CpWebhosting please tell me how to build a website using PHP?I want the easiest way to build a website, maintain it and have individual pages for good search engines ranking positions
Well you can use PHP INCLUDE method to made alterations in your website.This method will automatically update your whole website.For example if you have 300 files in you website and you want to make a common change in all of them,then you can use this method in which you have to just make change in one file and all other files will be automatically updated.
Well i have few tips for you which will help you while building you website.you must keep all the files which is related to your website in same folder.Do not make too many folders.This will help you work with ease when your website will grow up to large.
Secondly always give names to your files in lowercase letters.
open up your HTML editor and create a new page, save this page as template.php inside the folder you have just created. The extension of the page you create has to end with .php.
hey Jap we are opening a html editor then why we are using .php instead of .htm extension?
This is because All page extensions need to end with .php to allow PHP to parse the pages and include the includes!
Now make the source code by creating tables in WYSIWYG.
Now everytime open up new blank pages from html editor to create following pages for your website:-
1)template.php (Our main page which we will be using again later)
2)header.php (Our included page header)
3)footer.php (Our included footer page)
4)menu.php (Our included page which will have our menu links on)
Hey where have we used PHP include in our website?
Well it will be used in template file.For example if you use Contact,name and about in template.php then this information will be automatically generated in all the other pages.
ok thanx.Now php include function is very much clear to me.
Now in our final step , to view the pages you have created you will need to upload them to a PHP enabled web server.
How this step can be performed?
Well now every host provides it as a standard server.You do not need any special privalages to start it.Point your browser to the uploaded index page and you should be able to see the basic layout and pages we have just created.
Leave a Reply
You must be logged in to post a comment.