Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Page Layout?
01-23-2008, 07:09 PM #1
- Join Date
- Jul 2007
- Thanked 0 Times in 0 Posts
I making a php website and i was going to use framesets for the layout but then i decided not to so i say that some sites use some sort of layout also like framesets but its not! So i want to make my site index url like index.php?page=news and in the index have it get the $page variable and include news.php there! It does include it but when i interact with the new page i goes to the new.php page and then my menu and banner is not shown!
Is there anyway to fix this or do php have its own frameset like scripts avaliable?
01-24-2008, 01:23 AM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,648 Times in 2,617 Posts
Maybe you mean that you want to 'include' the file news.php when the index.php?page=news is that right?
Easy to do, assuming that 'news.php' has output to the browser, or can be fetched and dumped into the scope of the index.php script:
$file = '/path/to/my/files/' . $_GET['page'] . '.php';
Is that kinda what you are looking for?PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');