Log In · Register

 
Php questions?, I need help with php.
Maccabee
post May 1 2008, 08:47 PM
Post #1


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



Ok because I cant veiw peoples php there are things I cant find out.

So here is my question?

Is it better to do this:

< ?php include ("header.php"); ? >

< ?php include ("nav.php"); ? >

< ?php include ("ad.php"); ? >

Content

< ?php include ("foot.php"); ? >


or condense header,nav and ad .php into one file and do this:

< ?php include ("tophalf.php"); ? >

content

< ?php include ("foot.php"); ? >

Get what im saying?

If you dont can someone just send me a code of what their site looks like with the php.
 
 
Start new topic
Replies
venti-anemoi
post May 1 2008, 09:42 PM
Post #2


torn
*****

Group: Official Designer
Posts: 953
Joined: Oct 2004
Member No: 55,718



Technically.......... I don't think it really matters. Because what the PHP basically does (as far as I can understand it) is copy the stuff from the inclusion file and paste it into the html file. For example, if you code a page using PHP and then look at the source code of the page, you won't see "< ?php include ("header.php"); ? >"; you'd see whatever it was you put in header.php.

Soo....if you always have header, nav, and ad together on every single page, then I would suggest combining them into one file, just 'cause it makes the coding neater and simpler.

If some pages differ (sometimes you don't have ad, sometimes you don't have nav, etc.) then I don't see anything wrong with having those three parts.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: