newbie: include produces 'funny' HTML

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Kadmin
Forum Newbie
Posts: 7
Joined: Sat Jul 06, 2002 2:39 am
Location: Missouri, USA

newbie: include produces 'funny' HTML

Post by Kadmin »

Testing a very basic template, something to the
effect of:

<?
include ("header.php");
print ("<BR>content goes here<BR>");
include ("footer.html"); #there's no php code in the footer
?>

For some reason this places the "footer" *inside* the
table of the header, but placing the client side source
into a browser produces the correct effect. I'm sure
it's simple and I'll come up with it sometime, but it's
late and I'm brain dead....anyone up with insight?

KDK 8O
shareme
Forum Newbie
Posts: 22
Joined: Sat Jun 29, 2002 4:50 pm

Re: newbie: include produces 'funny' HTML

Post by shareme »

Kadmin wrote:Testing a very basic template, something to the
effect of:

<?
include ("header.php");
print ("<BR>content goes here<BR>");
include ("footer.html"); #there's no php code in the footer
?>

For some reason this places the "footer" *inside* the
table of the header, but placing the client side source
into a browser produces the correct effect. I'm sure
it's simple and I'll come up with it sometime, but it's
late and I'm brain dead....anyone up with insight?

KDK 8O
Is this the new version of pHP? What version of PHP might you be on and what server platform are you on?
User avatar
Kadmin
Forum Newbie
Posts: 7
Joined: Sat Jul 06, 2002 2:39 am
Location: Missouri, USA

Post by Kadmin »

<kadmin@elisha> [/home/kadmin] [10:06] #php -v
4.1.1
<kadmin@elisha> [/home/kadmin] [10:06] #httpd -v
Server version: Apache/1.3.22 (Unix)
Server built: Jun 25 2002 11:35:09
**********************************************
Don't know if I can play with it any more today, got yard
work to do. TIA for your help!

KDK
MattF
Forum Contributor
Posts: 225
Joined: Sun May 19, 2002 9:58 am
Location: Sussex, UK

Post by MattF »

It could be that you have incorrect HTML, sometimes people forget to close the <table> and it hashes everything up - validate the code and it will tell you if it is OK. http://www.w3.org
shareme
Forum Newbie
Posts: 22
Joined: Sat Jun 29, 2002 4:50 pm

re

Post by shareme »

MattF wrote:It could be that you have incorrect HTML, sometimes people forget to close the <table> and it hashes everything up - validate the code and it will tell you if it is OK. http://www.w3.org
and don't forget that some browsers do not like extra line spaces in the closing or opening tr and td tags..
Post Reply