By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,746 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,746 IT Pros & Developers. It's quick & easy.

PHP Website

P: 32
Hi Friends

Iam newbie to PHP website.I have PSD file template.How to design my template in php.How to call same header in all pages in PHP.how to create Template bottom and header. and also how to call every page these 2 sections. please reply me.

regards
apking
Feb 26 '08 #1
Share this Question
Share on Google+
1 Reply


nathj
Expert 100+
P: 938
Hi Friends

Iam newbie to PHP website.I have PSD file template.How to design my template in php.How to call same header in all pages in PHP.how to create Template bottom and header. and also how to call every page these 2 sections. please reply me.

regards
apking
Hi,

PHP s a scripting language and is not for the deign of the web site. the design of the web site should be handled by a separate CSS file.

Defining the header footer sections once is smart. You define these in a normal php file and then when you want them to appear you use the include line:
[php]
include 'header.php' ;
[/php]
This is done in the exact place in code where you want the contents of the file included. The server reads that line and pulls in the content of the file to the place. Then the page is served to the browser.

This can also be done in plain old HTML. The line is a bit different and the file that is including the header or footer must be a SHTML file.

Run a Google search on Server Side Includes for more informaiton.

nathj
Feb 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.