quote:
Originally posted by Eddie
Another question, how would i go about including different directories, i understand what you said, but then your llama output only allows for one directory.
For example i have the following directories.
/page/info/
/page/users/
/page/resources/
Using your method above how would i do this? If its not possible i will just combine all the pages, but yeah.
Easy fix, you just add the directory before the page name variable. So for your exmaple detailed in your post...
php code:
$page = $_GET['p'];
$llama = "./page/"."$page".".hz";
if(file_exists($llama) == TRUE){
include ($llama);
}
else{
include("error.php")
}
then a link to file.hz in ./page/info/ would be...
html code:
<a href="?page=info/file">link</a>
Edit: Posted re-written/heavily edited re to segosa's comment about the coding, and to rectify a couple of minor mistakes.