[Alexander Wagner <[EMAIL PROTECTED]>] > 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 <[EMAIL PROTECTED]> Fast Search & Transfer ASA, Trondheim, Norway -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]