You are here: Re: body tags in an include? Related question « PHP Programming Language « IT news, forums, messages
Re: body tags in an include? Related question

Posted by Jerry Stuckle on 04/02/06 05:37

Stephen Kay wrote:
> in article os6dnf-A8tscGbPZnZ2dnUVZ_vudnZ2d@comcast.com, Jerry Stuckle at
> jstucklex@attglobal.net wrote on 4/1/06 8:45 AM:
>
>
>>No, multiple <head> and <body> tags in a document are invalid.
>>
>>include() effectively just does a "copy and paste" of the new file into the
>>existing one. So if both files have <body> tags then you end up with two
>><body>
>>tags, as you found.
>>
>>And it's time to fire the idiots who places these tags in included files!
>
>
>
> Related to this question, I am changing a previously "all HTML" site into a
> "dynamically displayed by php" site. So I now have a template file with a
> header, footer, navbar, etc., and when you call one of the old pages, Apache
> redirects it into a dopage.php?p=page.html format, and the old page is read
> in to a $content variable, and displayed inside the template. Pretty
> straightforward.
>
> However, since all of the old pages (and there's a lot of them) were HTML
> standalones, they all have headers, html tags, and body tags.
>
> At the moment, it seems to be working fine, even with the extra html,
> header, and body tags displayed in the middle of the page, nested inside the
> "real" html and body tags.
>
> I assume this is a no-no, but what are the problems with just leaving it
> this way? It seems to be working anyway. Otherwise, I assume the options are
> to rewrite every single page to remove this stuff, or to try and remove it
> procedurally after reading it into the $content variable.
>
> Thanks,

Other than:

1. It may or may not work in all current browsers,
2. It may or may not work in next generation browsers,
3. One look at the source (in any browser) shows you are lousy webmaster.

Any questions?

And btw - I would never code something like this in the first pace. Virtually
impossible to maintain!


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация