|
Posted by Margaret Willmer on 06/30/06 10:10
no@emails.thx wrote:
> On Wed, 28 Jun 2006 08:10:57 GMT, "Dr Hackenbush"
> <bazwillCRAPOUTrun@yahoo.co.uk> 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.
What a great, brief, explanation for using PHP especially for those of
us whose programming skills are nil. Thank you
Could you tell me however, if there is an advantage in using
"require_once" instead of "include".
Margaret
Navigation:
[Reply to this message]
|