1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php includes question

Discussion in 'CSS' started by Lpspider, Dec 20, 2005.

  1. #1
    Can you have a php include inside a php include?

    Also, can you have a css file in a php include, and just link to the php include on your page and not the stylesheet individually on each page?
     
    Lpspider, Dec 20, 2005 IP
  2. ServerUnion

    ServerUnion Peon

    Messages:
    3,611
    Likes Received:
    296
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can include an include within an include ( if that makes sense)

    It however is best to use CSS includes as you would in the head as the borwser will cache the file localy for the users and will increase the speed of you site.
     
    ServerUnion, Dec 20, 2005 IP
    1 person likes this.
  3. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #3
    good advice.
     
    mdvaldosta, Dec 20, 2005 IP
  4. ScottBannon

    ScottBannon Well-Known Member

    Messages:
    408
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    168
    #4
    I suppose that using an include for the CSS page would be similar (to browsers) to having your CSS be inline?

    Not sure what the point to doing it could be, but I don't see why you couldn't make it work.
     
    ScottBannon, Dec 20, 2005 IP
  5. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sure, it's be the same as having it inline but the point made by ServerUnion was that calling for it in the head would allow your browser to cache it and save bandwidth and page loading time.
     
    mdvaldosta, Dec 20, 2005 IP
  6. ScottBannon

    ScottBannon Well-Known Member

    Messages:
    408
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    168
    #6
    That's why I said I didn't see what the point in using a php include would be, but I suppose the original poster has a reason for this.
     
    ScottBannon, Dec 20, 2005 IP