Page 1 of 1
newbie: include produces 'funny' HTML
Posted: Sat Jul 06, 2002 2:39 am
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

Re: newbie: include produces 'funny' HTML
Posted: Sat Jul 06, 2002 8:45 am
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

Is this the new version of pHP? What version of PHP might you be on and what server platform are you on?
Posted: Sat Jul 06, 2002 10:08 am
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
Posted: Sat Jul 06, 2002 3:03 pm
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
re
Posted: Sun Jul 07, 2002 7:10 am
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..