require function

require() operates like include(), including a template into the file in which the require() call is located.

require Syntax:

 require (filename);

However, there are two important differences between require() and include(). First, the file will be included in the script in which the require() construct appears, regardless of where require() is located. For instance, if require() is placed within an if statement that evaluates to false, the file would be included anyway.

The second important difference is that script execution will stop if a require() fails, whereas it may continue in the case of an include(). One possible explanation for the failure of a require() statement is an incorrectly referenced target path.

require example :

  include_once "require /";
  /* the script continues here */
?> is a File.