Reply to Re: body tags in an include? Related question

Your name:

Reply:


Posted by Cliff Smith on 04/02/06 14:02

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,
You could alway strip the code of each page, so that all that is used
from an include is the stuff between the body tags.... at least it would
then be compliant.

[Back to original 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

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