The Note You're Voting On
boda0128318 at gmail dot com ¶ 5 years ago
1 - "require" and "require_once" throw a fatal error if the file is not
existing and stop the script execution
2 - "include" and "include_once" throw a warning and the execution
continues
3 - "require_once" and "include_once" as their names suggests ,
they will not include the file if the file was already included with
"require", "require_once", "include" or "include_once"
try the following code:
create a file called "index.php"
<?php
require "first.php"; // this will include the file
include_once "first.php"; // this will not as it was included using "require"
require_once "first.php"; // this will not as it was included using "require"
?>
and another file that is called "first.php" and write the following header
-------------------------------
<h1>Hello every one</h1>
--------------------------------
i hope this will help you