Re: Why php ?
- From: no@xxxxxxxxxx
- Date: Wed, 28 Jun 2006 08:39:24 GMT
On Wed, 28 Jun 2006 08:10:57 GMT, "Dr Hackenbush"
<bazwillCRAPOUTrun@xxxxxxxxxxx> wrote:
I know that php is used for sites that have dynamic content like databases
etc, but is there any advantage/disadvantage to creating a site with php
that has no dynamic content just tables and cells with text and images.
There is good reason to use PHP's require() or include() functions if
you have standard content that you want loading into all pages. A
common use would be to create a navigation button/menu bar and banner
header as a seperate file and then do
<?php require_once('header.php'); ?>
In the header of each of your pages. I often have a header and footer
routine that does all the standard HTML at the top and bottom, leaving
me to just write the body content in the middle. It's very easy to do
and you just rename your .htm pages .php and off you go.
Another use would be if you are tracking session variables. Here you
might have your session_start() command in your header.php file and
this would mean you could preserve the state of selected variables
between pages.
Chris R.
.
- Follow-Ups:
- Re: Why php ?
- From: Margaret Willmer
- Re: Why php ?
- From: Dr Hackenbush
- Re: Why php ?
- References:
- Why php ?
- From: Dr Hackenbush
- Why php ?
- Prev by Date: Re: Help - Outputting Thumbnails
- Next by Date: Ignoring Case
- Previous by thread: Why php ?
- Next by thread: Re: Why php ?
- Index(es):