I have simple PHP code to include content from various files into a stable frame. This works fine on my college's PHP Version 5.1.2 and Apache 2.0 Handler Server API.
The code does not work on DreamHost PHP Version 5.2.17 CGI/Fast CGI Server API.
Here is a copy of the code.
// The following should be used for a PHP site template
// in order to ensure the same "appearance" of all
// content on a website.
// href values should start with "?pg="
// Verify that the value of $pg is acceptable. Feel free
// to modify these conditions based on your individual needs.
if ((empty($pg)) || (ereg('http://', $pg)) || (!(file_exists("./".$pg))) || (pg=='index.php'))
$pg = "rochester.html" ;
This space has HTML code for the site frame and then in the content division of the document comes the PHP include statement.
<? include($pg); ?>
Content is added by using a link such as the following
<a href="http://jamesbearden.net/?pg=rochester.html">Rochester Neighborhoods</a>
causing the contents of "rochester.html" to be included in the content division of the page viewed.
As I said this work find on my college server but not DreamHost.
Can someone point me in the right direction to change code or the settings to make this work at DreamHost?