View Single Post
Old 10-18-2004, 06:07 PM   #3 (permalink)
Vormund
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default

Yeah, what he said

And it does not have to be just a .php extension--it can be virtually any, but yeah--PHP, TXT, HTML etc. are the most frequently used (probably in that order). There are also three other closely related terms:
include_once - will only include it if it has not been previously included in the document
require - the page/script will literally die if the page to be "included" is not there
require_once - will oly include it if it has not been previously included in the document AND it exists -- else as require, it will die.

PHP.net about the include function:
http://us2.php.net/manual/en/function.include.php

a simple example:

item.php
<?php
$fruit = "apple";
?>

show.php
<?php
include "item.php";
echo $fruit;
?>

Running "show.php" would output simply output:
Apple

Basically reiterated what he just said, but yeah, I'm bored: )
__________________
Vormund is offline