|
|
Include Once Statement in PHP
|
Tutorials » Php »
|
Topic |
What is Include Once statement?
|
|
Explanation |
|
include_once() function checks the file after execution of the file and also for
the similarity in coding, if the coding is already included, it will not include the file.
Example:
b.php
<?php
echo "bbbb";
?>
TestCode.php
<?php
include 'b.php';
include_once "b.php";
?>
Result:
bbbb
In the above example the "include_once" statement will not include the file "b.php", since it already included and
the code is similar for both the files.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|