<?php if($file) { $include = "home/content/$file.inc"; if(!file_exists("$include")) { $errorfile = "$include"; $include = "home/content/notfound.inc"; } $contentname = "$include"; $contentread = @fopen($contentname, "r"); $content = fread($contentread, filesize($contentname)); } elseif ($script) { $include = "php/$script.php"; if(!file_exists("$include")) { $errorfile = "$include"; $include = "home/content/notfound.inc"; } include("$include"); } else { $file = "main"; $include = "home/content/$file.inc"; $contentname = "$include"; $contentread = @fopen($contentname, "r"); $content = fread($contentread, filesize($contentname)); } ?>Put that at the top of you're page.php file.
Now got there you want the info to be displayed and put:
<?php echo $content; ?>
Please don't be a nub and name this new file page.html -_-
It's php so name the file page.php.
how it works:
make a new folder called "home, in that make another folder called "content" in it make 2 empty text files called "main.inc" and "notfound.inc".
When you load page.php it will open main.inc and display what ever is in you're main.inc file. Give this a try before reading anymore.
adding pages:
make a new screenshots.inc file. now goto "page.php?file=screenshots" and the content of the screenshots.inc file will be displayed.
This is a complex code so you will be confused.
There is a realy easy way which is juts 1 line, but you asked for the page.php file :uh: