LeftWinger11
2009-12-18 19:43:09 UTC
function display_page_content() {
$page = $_GET['page'];
switch($page) {
case 'page1':
include $_SERVER['DOCUMENT_ROOT'].
"/folder/subfolder/another/somefile.php";
break;
case 'page2':
include $_SERVER['DOCUMENT_ROOT'].
"/folder/subfolder/another/thisfile.php";
break;
case 'page3':
include $_SERVER['DOCUMENT_ROOT'].
"/folder/subfolder/another/thatfile.php";
break;
default:
require $_SERVER['DOCUMENT.ROOT'].
"/folder/subfolder/another/anotherfile.php";
}
}
PS. Each of the include statements should not be broken up into two lines. Yahoo Answers keeps cutting them off so imagine they are one line of code.