PHP Include Function

This function is used to insert the content of one PHP file into another PHP file before the server executes it.

Can be used multiple times:

<?php include("navigation.php"); ?>

Once only:

<?php include_once("navigation.php"); ?>

Including from the root:

<?php
   $path = $_SERVER['DOCUMENT_ROOT'];
   $path .= "/common/header.php";
   include_once($path);
?>

No comments:

Post a Comment