Log In · Register

 
 
Closed TopicStart new topic
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.
 
heyo-captain-jac...
post May 1 2008, 08:49 PM
Post #2


/人◕‿‿◕人\
*******

Group: Official Member
Posts: 8,283
Joined: Dec 2007
Member No: 602,927



I'm not the best with PHP, but I think the first one is probably what you want to go with.
 
venti-anemoi
post May 1 2008, 09:42 PM
Post #3


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.
 
synatribe
post May 1 2008, 09:53 PM
Post #4


AIDS at RAVES.
******

Group: Official Designer
Posts: 2,386
Joined: Dec 2007
Member No: 598,878



i use the second one because gernally I want my nav to be the same on every page of my site and the ad usually rotates depending if your using google or bidvertisers, but I find the second one a lot easier to manage:]
 
Maccabee
post May 2 2008, 10:14 AM
Post #5


Senior Member
*******

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



QUOTE(SkyliteX @ May 1 2008, 09:53 PM) *
i use the second one because gernally I want my nav to be the same on every page of my site and the ad usually rotates depending if your using google or bidvertisers, but I find the second one a lot easier to manage:]


Awesome thanks.

I just dont see a point in doing it the first way.

Even if I want to change the ad ill just change it in the first half.
 
synatribe
post May 2 2008, 06:06 PM
Post #6


AIDS at RAVES.
******

Group: Official Designer
Posts: 2,386
Joined: Dec 2007
Member No: 598,878



QUOTE(JosephCohen123 @ May 2 2008, 10:14 AM) *
Awesome thanks.

I just dont see a point in doing it the first way.

Even if I want to change the ad ill just change it in the first half.

ur welcome:]
 

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