Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    27

    Unanswered: Is it safe to include HTML <head> section in a separate file?

    Hello all,

    I have about 9 years experience of HTML but i'm pretty well new to PHP. I learned both on my own, mostly using google. So i don't have much idea about what techniques do others practice while designing a website.

    My problem is I want to save <head>...</head> in a separate file and include() it in all PHP files. So that I could change css3, website theme, favicon etc easily.
    Just wanted to ask, is this common practice? Is it safe? What problems it can cause?

  2. #2
    Join Date
    Sep 2010
    Posts
    27
    90 views and no reply. Where are you guys?

  3. #3
    Join Date
    May 2008
    Posts
    277
    That should be fine, and in fact is similar to what Rasmus Lerdorf (creator of PHP) does in his "no framework" framework example (although the page seems to be down at the moment of this posting, although Google has the page cached if you search for it).

  4. #4
    Join Date
    Sep 2010
    Posts
    27
    Thanks futurity.
    Entire Rasmus' site is down for the time being. However I have viewed its google cache.
    Now i'm going to save <head> in a separate file.
    thanks again.

  5. #5
    Join Date
    Sep 2010
    Posts
    27
    <head> separation done!
    Last edited by belask; 04-01-11 at 18:46.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •