First of all, require() will result in a fatal error if it doesn't find the file. That may be why the last line doesn't show up -- PHP immediately halts processing of the page. Try using include() instead, and see if your page loads completely.
Second... your warnings are occuring because you are using single quotes. PHP expects to load what's between the single quotes literally. If you typed
include('$file.php')
then it expects to find a file called "$file.php."
Now... I am assuming that you have two files -- one called whateverhome.html and whatever.html, right? Then I recommend you use this code:
<?php
// never assume that register_globals is ON. So:
$file = $_GET["file"];
// to prevent errors in case "file" was not included in the URL:
if ($file != "") {
// we must use concatenation outside quotes since $file is only part of the name:
include($file . "home.html");
// but not here, since it's the whole name:
include("$file.html");
}
?>
Once you have determined that everything is working correctly, and you are getting no warnings, then change the appropriate include()s to require() or require_once().
As a side note, you CAN include files other than PHP, as we are here. You can even use an URL to refer to the file, as long as allow_url_fopen is enabled in php.ini (which it is by default). Of course, more info on this is available in TFM. 😉
Hope that helps!