Page 1 of 1

PHP in XHTML

Posted: Wed Jan 04, 2006 5:48 pm
by Capm
Anyone know if there is a way to display a php page inside an xhtml page?

Posted: Wed Jan 04, 2006 10:25 pm
by DCrazy
Huh? Do you want to include the PHP page's source in the file, or do you want it to be processed? Either way, your \"XHTML Document\" will have to be a PHP page that outputs XHTML (well, you could use an IFRAME or LAYER to include the PHP page's contents).

Posted: Wed Jan 04, 2006 11:18 pm
by fliptw
xhtml is a standard for formatting the content of a data stream sent by a web server.

In short, you can keep the extension as php. PHP doesn't really give a damn if its XHTML, HTML 4.0 or PNG.

Posted: Wed Jan 04, 2006 11:56 pm
by Capm
IFRAME worked. never used that before... this is the first xhtml i've worked with.

Posted: Fri Jan 06, 2006 9:33 am
by DCrazy
The question is why isn't your PHP file outputting the XHTML instead? Less convoluted than using an IFRAME.

Posted: Fri Jan 06, 2006 9:54 am
by Capm
Well, because its the portal for a forum software - the original php is outputting xhtml - but that side of it is complex as hell and I don't want to touch it, where the xhtml templates are easy to access and edit and I can understand essentially what it is doing.

The Iframe works nicely, don't know why you don't care for it. (www.midnightsquadron.com is what I'm fiddling with)

Posted: Fri Jan 06, 2006 11:01 am
by DCrazy
I don't like IFRAMEs because they were originally an IE-specific addition and therefore there's nothing binding Firefox, Opera, et al to even implement it (in fact, Netscape/Mozilla has LAYER for the same purpose). Luckily, since it's been around since around the days of HTML 3.0, most browsers do implement it.