Here is what I just tried:
<?php
if( !isset($page) )
{
$_GET['page'] = "news";
}
$page = $_GET['page'];
require('/home/xxxxxxxx/includes/PAGEINDEX.txt');
include($values[$page]);
?>
//=============
//THEN THE PAGEINDEX.txt FILE HAD:
$values = array(
"base" => array (
'home' => 'index.htm',
'news' => 'news/archives/index.htm',
'us' => 'us.htm',
'links' => 'links.htm',
'dl' => 'dl.htm',
'music' => 'music.htm',
'bands' => 'bands.htm',
'concert' => 'concert.htm',
'rants' => 'rants/index.htm',
'reviews' => 'reviews/index.htm',
'articles' => 'articles/index.htm'
),
"rants" => array (
require('/home/xxxxxxxx/includes/RANTINDEX.txt')
),
"articles => array (
require('/home/xxxxxxxx/includes/ARTICLEINDEX.txt')
),
"reviews" => array (
require('/home/xxxxxxxx/includes/REVIEWINDEX.txt')
)
);
//=============
//THEN EACH OTHER INDEX FILE WAS SIMILAR TO:
'EpVAklyAyEbHsnXTqq' => 'rants/itsgonnabeawildride.....htm',
'EpVykuyEpFfKytHqDV' => 'rants/charliethecherrylimaide.htm',
'EpVupAFllVSomXrePY' => 'rants/airplane.htm',
'EpuZuEEFlEemWnxQbu' => 'rants/letsbeanti-warpt.2.htm',
'EpuZFyuyZEdBPrIjhk' => 'rants/reality.htm',
This was giving me errors though with my second key. It would dump my array file into the template so it could be seen, along with the error. In theory this should allow me to call a file with www.mydomainname.com/view.php?page=EpVAklyAyEbHsnXTqq, and I am getting closer now I think. I am reading about arrays and maybe my problem is that I can't put a 'require' statement inside the array. Where to go from here?
The error is:
$values = array( "base" => array ( 'home' => 'index.htm', 'news' => 'news/archives/index.htm', 'us' => 'us.htm', 'links' => 'links.htm', 'dl' => 'dl.htm', 'music' => 'music.htm', 'bands' => 'bands.htm', 'concert' => 'concert.htm', 'rants' => 'rants/index.htm', 'reviews' => 'reviews/index.htm', 'articles' => 'articles/index.htm' ), "rants" => array ( require('/home/xxxxxxxx/includes/RANTINDEX.txt') ), "articles => array ( require('/home/xxxxxxxx/includes/ARTICLEINDEX.txt') ), "reviews" => array ( require('/home/xxxxxxxx/includes/REVIEWINDEX.txt') ) );
Warning: main(): Failed opening '' for inclusion (include_path='') in /home/xxxxxxxx/public_html/view.php on line 171