require:
This is an easy
way to store common variables, functions, or lines of HTML that will be included in multiple scripts/pages. Failure of the function generates an error.
Example:
require('index.htm');
Include:
Include and evaluate the file as part of the current script/page. This is an easy way to store common variables, functions, or lines of HTML that will be included by multiple scripts/pages. Failure of the function generates an error.
Example:
include('index.inc');
require_once:
Include and evaluate the file as part of the current script/page. If the file has already been included, it will ignore the request. This is an easy way to store common variables, functions, or lines of HTML that will be included by multiple scripts/pages. Failure of the function generates an error and terminates the script immediately.
Example:
require_once('index.php');