Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
Moderator: General Moderators
davidtube
Forum Commoner
Posts: 79 Joined: Sun Mar 25, 2007 8:42 pm
Post
by davidtube » Fri Apr 11, 2008 5:56 am
Just wondering if people ever make pages like this ?
Code: Select all
<html>
<?php
include header.php;
include top.php;
include middle.php;
include bottom.php;
?>
</html>
aceconcepts
DevNet Resident
Posts: 1424 Joined: Mon Feb 06, 2006 11:26 am
Location: London
Post
by aceconcepts » Fri Apr 11, 2008 8:46 am
I don't think it would offer much flexibility for future development.
Is this how you're planning to structure your site?
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Fri Apr 11, 2008 8:50 am
I think what you're referring to is a "composite view". That's a very common way of piecing together the components on the page. If you've got complicated logic (i.e. business logic) inside any of those includes then there are better ways of structuring things
davidtube
Forum Commoner
Posts: 79 Joined: Sun Mar 25, 2007 8:42 pm
Post
by davidtube » Fri Apr 11, 2008 10:20 am
Well it's a simplified version of what I was thinking of. More likely It'll be more like this:
Code: Select all
<html>
<?php
include header.php;
include top.php;?>
This is page 4. It's the best page!
<?php include bottom.php;
?>
</html>
aceconcepts
DevNet Resident
Posts: 1424 Joined: Mon Feb 06, 2006 11:26 am
Location: London
Post
by aceconcepts » Fri Apr 11, 2008 10:41 am
Yeh, that seems more flexible to me