PHP in XHTML

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2263
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

PHP in XHTML

Post by Capm » Wed Jan 04, 2006 5:48 pm

Anyone know if there is a way to display a php page inside an xhtml page?
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy » Wed Jan 04, 2006 10:25 pm

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).
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6415
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw » Wed Jan 04, 2006 11:18 pm

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.
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2263
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

Post by Capm » Wed Jan 04, 2006 11:56 pm

IFRAME worked. never used that before... this is the first xhtml i've worked with.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy » Fri Jan 06, 2006 9:33 am

The question is why isn't your PHP file outputting the XHTML instead? Less convoluted than using an IFRAME.
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2263
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

Post by Capm » Fri Jan 06, 2006 9:54 am

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)
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy » Fri Jan 06, 2006 11:01 am

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.
Post Reply