SuperSquirel
Thread Starter
- Joined
- Apr 18, 2004
- Messages
- 15
I've been using the a line of PHP i was given a year or 2 ago for the new site i'm creating, it is supposed to automatically include an html page that i specify in the url (ie. index.php?page=news), however its not working on my main webhost.
here is the line of code:
<? if (isSet($page)) { $file="$page.html" ; if (file_exists("$file")) { include("$file"); } else { include('./404.html'); } } else { include("main.html"); } ?>
the problem is that main.html is included every time even when i specify another page to be included. however when i uploaded the exact same index.php, a test page and main.html to my old webhost it worked perfectly.
The puzzling thing is my current website uses phpnuke and i have a custom module which uses the same line of code and that works fine.
does anyone know if somethin in the code could be causing problems or if it could perhaps be a server configuration?
here is the line of code:
<? if (isSet($page)) { $file="$page.html" ; if (file_exists("$file")) { include("$file"); } else { include('./404.html'); } } else { include("main.html"); } ?>
the problem is that main.html is included every time even when i specify another page to be included. however when i uploaded the exact same index.php, a test page and main.html to my old webhost it worked perfectly.
The puzzling thing is my current website uses phpnuke and i have a custom module which uses the same line of code and that works fine.
does anyone know if somethin in the code could be causing problems or if it could perhaps be a server configuration?