Re: Why php ?
- From: Margaret Willmer <margaret@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 11:10:33 +0100
no@xxxxxxxxxx wrote:
On Wed, 28 Jun 2006 08:10:57 GMT, "Dr Hackenbush"What a great, brief, explanation for using PHP especially for those of us whose programming skills are nil. Thank you
<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.
Could you tell me however, if there is an advantage in using
"require_once" instead of "include".
Margaret
.
- Follow-Ups:
- Re: Why php ?
- From: Markus Ernst
- Re: Why php ?
- References:
- Why php ?
- From: Dr Hackenbush
- Re: Why php ?
- From: no
- Why php ?
- Prev by Date: Re: a SQL Server database in php
- Next by Date: Re: All Monday's & Thursdays
- Previous by thread: Re: Why php ?
- Next by thread: Re: Why php ?
- Index(es):