Re: A php's patch for support xhtml

From: Date: Fri, 05 Oct 2001 00:15:26 +0000
Subject: Re: A php's patch for support xhtml
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-67305@lists.php.net to get a copy of this message
[Alexander Wagner <wagner@globalpark.de>] > 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. Will newbies really use XHTML? Anyway, people have been embedding PHP in WML and other XML formats without visible problems for a while now. IF we are to add another Apache type mapping for this, it should be "application/x-httpd-php-xml". IMHO it adds complexity to PHP without really solving any problems that could not be "configured around". > 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()? This approach has been abandoned AFAIR. - Stig -- Stig Sæther Bakken <ssb@alltheweb.com> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.dev (#67305) next »