Error with fileincluding
<p>I'm trying to make a throughly thought out and comprehensive system to include pages for a small hobby project I kicked off today.</p>

<p>This is my code at the moment:</p>

<pre><code>$page = get_uri(1);
if(!isset($page)){ $page = "Home"; }
$pages = array(
        "" =&gt; "home.php",
        "Home" =&gt; "home.php", 
        "Product" =&gt; "product.php",
        "category" =&gt; "category.php"
);
if(in_array($page, $pages) &amp;&amp; file_exists(PAGE_DIR.$pages[$page])){
    include(PAGE_DIR.$pages[$page]);
} else {
    echo 'Uh oh. Four Oh Four, we failed to find the page you are looking for. :( &lt;br /&gt;';
}
</code></pre>

<p>PAGE_DIR is defined to be <code>= "/pages/"</code>which is where I host my page files. I've created <code>Home.php</code> just to proove my theory, and <code>get_uri(1)</code> is, for now, a null value as I'm trying to get the theory to work. I'm sure the problem lies somewhere in <code>file_exists</code>, but cannot work out where the problem's at.</p>
