.pre { font-size:12px; font-family:helvetica, arila, tahoma, lucida; color:green; }

Include this bit of php at the top of your document, BEFORE the <HTML> and <HEAD> tags:

<!--// START... Copy-->

<?php

// Enable output buffering
// More info: http://www.php.net/ob_start
ob_start();

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<!--// END... Copy-->


<html>

 <head>

 <body>

<td>   <--// You can use this anywhere. I choose to use it within table cells (<td>), as tables are how I build pages, but am currently refining css & <div>'s.-->


<!--// START... Copy and Paste From the next line ( you do not need to include this one )-->

<?php

// Define our array of allowed $_GET values - For every spec sheet you creat, You need to add it's name here. - Landis.
$pass = array( 'contact','service', 'about', 'parts', 'catalog', 'new', 'pmservice',
'028','053','245','045','046','042','043','040','052','039','245','248','035','034','014','038','057','056','054','058',  //(these are the names of html docs allowed)
);

// If the page is allowed, include it:
if (in_array($_GET['id'], $pass)) {
include ($_SERVER['DOCUMENT_ROOT'] . '/inc/' . $_GET['id'] . '.html');   //(this is where we diclair the extention for the allowed docs in the inc dir)
}

// If there is no $_GET['id'] defined, then serve the homepage:
elseif (!isset($_GET['id'])) {
include ($_SERVER['DOCUMENT_ROOT'] . '/inc/about.html');  //(this is where we diclair what doc will load by default when an id is not found or used)
}

?>

<!--// END... Copy to the line above ( you do not need to include this one either )-->

</td>

 </html>


See this in action:Response Forklift.com

Close this window



<?php
$path = ini_get('inclued.dumpdir');
if ($path && is_dir($path)) {

    echo "Path: $path", PHP_EOL;

    $inclues = new GlobIterator($path . DIRECTORY_SEPARATOR . 'inclued*');

    if ($inclues->count() === 0) {
        echo 'No clues today', PHP_EOL;
        exit;
    }

    foreach ($inclues as $inclue) {

        echo 'Inclued file: ', $inclue->getFilename(), PHP_EOL;

        $data = file_get_contents($inclue->getPathname());
        if ($data) {
            $inc = unserialize($data);
            echo ' -- filename: ', $inc['request']['SCRIPT_FILENAME'], PHP_EOL;
            echo ' -- number of includes: ', count($inc['includes']), PHP_EOL;
        }
        echo PHP_EOL;
    }
} else {
    echo 'I am totally clueless today, messing with php include dir dump... 17.05.12', PHP_EOL;
}
?>

out put for above code looks something like:

PATH: /tmp/inclued
Inclued file: inclued.56521.1
 -- filename: /Users/philip/test.php
 -- number of includes: 1

Inclued file: inclued.56563.1
 -- filename: /tmp/none.php
 -- number of includes: 0

Inclued file: inclued.56636.1
 -- filename: /tmp/three.php
 -- number of includes: 3