Hello to everyone, I'm a newbie that really needs help, been trying to make this php script work with no luck, when I'm running the site locally it works but after I move the files to the server Im getting the following error, hope someone can help me:
Warning: include(/var/chroot/home/content/16/5976816/html/inc/header.php) [function.include]: failed to open stream: No such file or directory in /home/content/16/5976816/html/vtr/test/index.php on line 49
This is the scrip that I'm using:
<?php
// Include the header:
include($_SERVER['DOCUMENT_ROOT'] . '/inc/header.php');
?>
<div id="contents">
<div id="content">
<?php
// Define our array of allowed $_GET values
$pass = array('intro','about','vincent-tran','philip-roggeveen','estate-planning','criminal-case','personal-injuries','bankruptcy','inmigration','deportation','family-law','litigation','corporations-and-llcs', 'payments','consultation','request-callback','contact-us');
// If the page is allowed, include it:
if (in_array($_GET['id'], $pass)) {
include ($_SERVER['DOCUMENT_ROOT'] . '/inc/' . $_GET['id'] . '.php');
}
// If there is no $_GET['id'] defined, then serve the homepage:
elseif (!isset($_GET['id'])) {
include ($_SERVER['DOCUMENT_ROOT'] . '/inc/intro.php');
}
// If the page is not allowed, send them to an error page:
else {
// This send the 404 header
header("HTTP/1.0 404 Not Found");
// This includes the error page
include ($_SERVER['DOCUMENT_ROOT'] . '/inc/error.php');
}
?>
</div>
</div>
<!-- end OutsideWrap-->
<?php
// Include the footer:
include($_SERVER['DOCUMENT_ROOT'] . '/inc/footer.php');
?>