Associate
- Joined
- 11 Oct 2008
- Posts
- 268
hey guys, for years ive been using a bit of code i found to include my news page and set my links up, its this bit of code
<?php
if(!$rpg || $rpg == ""){$rpg = "sector04";}
if(file_exists("$rpg.html")){
include ("$rpg.html");
} elseif (file_exists("$rpg.php")){
include ("$rpg.php");
} elseif (file_exists("$rpg.txt")){
include ("$rpg.txt");
} elseif (file_exists("$rpg")){
include ("$rpg");
} else{
include ("news.php");
}
?>
Ive just changed servers and for some reason none of my links work anymore, i know this code is pretty old, so im guessing theres a different way to do this with php 5, does anyone know what i have to change to get it working? thanks for any help
<?php
if(!$rpg || $rpg == ""){$rpg = "sector04";}
if(file_exists("$rpg.html")){
include ("$rpg.html");
} elseif (file_exists("$rpg.php")){
include ("$rpg.php");
} elseif (file_exists("$rpg.txt")){
include ("$rpg.txt");
} elseif (file_exists("$rpg")){
include ("$rpg");
} else{
include ("news.php");
}
?>
Ive just changed servers and for some reason none of my links work anymore, i know this code is pretty old, so im guessing theres a different way to do this with php 5, does anyone know what i have to change to get it working? thanks for any help
