Badcode? HTML as includes?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
DidiahProd@hotmail.com
Forum Newbie
Posts: 1
Joined: Sun Nov 10, 2002 7:58 pm

Badcode? HTML as includes?

Post by DidiahProd@hotmail.com »

Hey
Just wondering?
Is it really a bad idea to include full html files? The result is nested <head> and <body> tags inside the main Body tag. For example

<head>
</head>
<body>
Server calls include("thisFile.html")
Results:
<head>
</head>
<body>
content
</body
</head>
</body>
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

could be

Post by phpScott »

It will generally be alright to have mutliple <head><body> tags but it isn't good form :cry:
If the pages that you are going to include are only included into pages that have all the right <html> tags then just store the other pages without all the <head> and <body> tags.

It will make looking at your code for errors much easier.

phpScott
Post Reply