If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Is it safe to include HTML <head> section in a separate file?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-29-11, 18:00
belask belask is offline
Registered User
 
Join Date: Sep 2010
Posts: 27
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?
Reply With Quote
  #2 (permalink)  
Old 03-30-11, 16:21
belask belask is offline
Registered User
 
Join Date: Sep 2010
Posts: 27
90 views and no reply. Where are you guys?
Reply With Quote
  #3 (permalink)  
Old 03-30-11, 18:53
futurity futurity is offline
Registered User
 
Join Date: May 2008
Posts: 270
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).
Reply With Quote
  #4 (permalink)  
Old 03-31-11, 22:53
belask belask is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 04-01-11, 17:12
belask belask is offline
Registered User
 
Join Date: Sep 2010
Posts: 27
<head> separation done!

Last edited by belask; 04-01-11 at 17:46.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On