quote:
Originally posted by saralk
I would do something like this...
code:
<header>
<?php
if (!$a) { $a = "home"; }
include $a.".txt";
?>
<footer>
then have a file for each page, so index.php?a=links would load links.txt in the middle of the page. This way is better i think because you can add new pages without changing the main file.
It's dangerous to do that. What if I browse to page.php?a=../some_passwd_file
The visitor will be able to access a lot of private files on the server when you use the way saralk suggested, you should build in a protection at least.