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: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

PHP in XHTML

Post by Capm »

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 »

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: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

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

Post by Capm »

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 »

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: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

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

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