Forum Moderators: coopster
I think it may be a php version problem or maybe a security setting?
The page works fine on one server (my personal server), but when I upload it to the company server it doesn't work. What I have is a main template page that loads html documents into the body of the template.
Here is the code:
at the top of my document I have this:
<?php if ($page == "")
$page = "home"; ?> and in the body of my document I have:
<?php
$filename = "$page" . ".htm";
if (file_exists($filename)) {
include "$filename";
} else {
echo "<div><h1>Oops!</h1>
<p>Sorry, that file does not exist or is unavailable at this time. Please check the URL or visit our home page and try another link!</div>";
}
?> On one server (mine) it works as intended, loading the various html docs into the body of the page. On the company server, only the home page loads, no matter what link is clicked. Is there something I can do here to make sure it works on all servers? Did I use outdated or insecure code?
Any help is appreciated.
If that works then you have register_globals [us2.php.net] turned on and the company has it off.