Scriptplayground

 Print Page | Close Window

PHP Include

Here is a code snippet to include a file in your php page.

<?php
$exampleFile = 'header.php';
include($exampleFile);
?>

or you could include multiple files on one page.

<?php
include 'header.php';

// Some HTML code could go here!

include 'main.php';

// Some more HTML code could go here!

include 'footer.php';
?>

Find this article at:
http://scriptplayground.com/tutorials/php/PHP-Include/