The include_once()statement include and evaluates the specified file during of execution of the script.This is a behavior similar to the include() function with the only difference being that it code from a file has already been included.It will not be included again.
Syntaxinclude "function name";
Example
vars.php
<?php $color='red'; $fruit='apple'; echo $fruit."color is".$color" ?> |
test.php
<?php echo "a $color $fruit" // include 'vars.php include_once'vars.php' echo "a $color $fruit" ?> |




