Safcode Institute by Sir Safder





  • Include & Require Statement

    
    
    Include function is very useful when you want to add
    data of one file into another file. 
    Require function is also use when you want to add data
    of one file into another file. Both functions are some
    but there is a one difference in include and require
    function is that include() function produces a warning
    but the script will continue execution, while the
    require() function produces a warning and a fatal error
    i.e. the script will not continue execution.
    
    There are two more functions like include_once() and
    require_once() its means if you add the same file in
    multiple time (Mistakenly) you file show only once. 
    
    Include Example:
    <?php 
    include("safcode-header.php");
    include_once("safcode-header.php");
    ?>
    
    Require Example:
    <?php 
    require("safcode-header.php");
    require_once("safcode-header.php");
    ?>
    



  • You Can Also Watch Our Tutorial