1//The require statement has two variations, require and require_once.
2//The require/require_once statement is used to include file.
3
4// Require a file to be imported or quit if it can't be found
5<?php
6 require 'requiredfile.php';
7?>
8// Require_once is ignored if the required file has already been added by any of the include statements.
9<?php
10 require_once 'require_oncefile.php';
11?>
12
1As there is two different kind of require statements i.e. require and require_once
2both are having same functionality of including file into the another.
3
4Using require if the file is not misplaced or undefined then its stops the execution of the document.
5<?php
6 require 'requiredfile.php';
7?>
8
9And require_once is gets ignored if the file already imported with any other require or require_once.
10<?php
11 require_once 'require_oncefile.php';
12?>