PHP Require Once Statement

What is Require Once statement?

Explanation

The "require_once()" Statement is similar to "require()" except that it will check if the file has already been included and if so, will not include it again.
Example
<?php
include 'test1.php';
require_once ("test1.php");
?>

In the above example the since test1.php is already included, "require_once" statement will give a Fatal Error message

PHP Topics


Ask Questions

Ask Question