Re: A php's patch for support xhtml

From: Date: Thu, 04 Oct 2001 00:05:41 +0000
Subject: Re: A php's patch for support xhtml
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-67232@lists.php.net to get a copy of this message
Stig Sæther Bakken wrote: > > 1.Add a mime/type application/x-httpd-php-xhtml to mark xhtml > > mode. > > 2.disable short-tags and asp-tags in xhtml mode. > > 3.add <php> ... </php> instead <? ... ?> > > and <php-v eval="...."/> instead <?= .... ?> > > 4.ignore '<![CDATA[' and ']]>' in script block. > > Since XHTML is XML, <?php ... ?> is the proper way of embedding PHP > in XHTML files. +1 But this resolves only points 3 and 4. What about the first two? IIRC there was nothing done about PHP producing parse errors on <?xml and other PIs with short-tags enabled? XHTML is spreading and newbies might soon run into problems with short-tags, since these are activated on most ISPs I know of. Deactivating them via .htaccess is a little too difficult for most newbies. How about an instruction like good old "<?php_track_vars?>", which, when placed at the top of the script, would deactivate short-tags? Or is this possible via ini_set()? regards Wagner -- "Ein Mathematiker ist eine Maschine, die Kaffee in Theoreme verwandelt." Paul Erdös, Mathematiker, 1913-1996

« previous php.dev (#67232) next »