Reply to Re: body tags in an include?

Your name:

Reply:


Posted by Jerry Stuckle on 04/01/06 16:45

Big Bill wrote:
> On Sat, 01 Apr 2006 05:14:54 GMT, "Jim Carlock" <anonymous@127.0.0.1>
> wrote:
>
>
>>"Big Bill" <kruse@cityscape.co.uk> wrote:
>>
>>>http://www.promcars.co.uk/pages/bonnie.php
>>>I don't believe they should be there, can I take them out without
>>>stopping the includes from functioning? I'm the (hapless) optimiser
>>>on this one... I have to correct where they've spelled my name
>>>wrong too...sigh...
>>
>>Bill, look at it this way...
>>
>>If every page has the same image at the top of the screen, the same
>>menu on the left of the screen, and then they have the same opening
>><div class="maincontent"> tag, the best way to handle this is how?
>>Furthermore, if they ALL have the same <link > tag including the
>>same CSS file, the same javascript include tags, why not create one
>>file and just include it after inserting the
>>
>><title>,
>><meta name="keywords" ...
>><meta name="description" ...
>>
>>and they all will contain the same things here, unless you dynamically
>>load the left menu, topmenu items, et al. And even then, the included
>>file could identify which page gets loaded, and dim out the appropriate
>>menu items.
>>
>></head>
>><body><div id="topbanner">...</div>
>><div id="leftmenu">...</div>
>><div id="maincontent">
>>
>>tags. Furthermore, if each page reads it's keywords and description
>>and title from a database, you could configure it all inside one include
>>file, and use the page name/folder/or whatever to identify which record
>>to load and your whole presentation could come from a database.
>>
>>Jim Carlock
>>Post replies to the group.
>>
>
>
> Perhaps I should have put "Multiple body tags in one page due to php
> includes using them, one pair per include". Is that any clearer?
> That's the problem the page has if you look at it, multiple instances
> of the body tag. I don't believe they should be there as obviously an
> include shouldn't need to be topped and tailed with a body tag if it's
> one of several includes in an existing page with its own body tags
> anyway.
>
> BB

Bill,

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!

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

[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

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