Using include() to load different page content acts differently locally vs hosted
- by hookedonwinter
I have a live site that includes different php files depending on what page the user is trying to access. The header and footer are the same, but in the file, if the user requests filename1.php vs filename2.php, a different php is loaded into the content of the page. Basic CMS stuff.
On the live site, it works fine. I just set up a local dev environment, and it doesn't work. The file that is supposed to load into the middle of the page instead is the only file loaded. I'm not saying this well. Here's an example:
How it works live:
<html>
<head>
Stuff
</head>
<body>
More stuff
<? include( 'some_file.php' ); ?>
</body>
</html>
How it works locally:
<? include( 'some_file.php' ); ?>
Just that file loads, no other content.
Any thoughts on why that one page is loading, but not the surrounding content? If I'm not explaining this well, please let me know.