Re: A php's patch for support xhtml
| From: | (Stig Sæther Bakken) | Date: | Wed, 03 Oct 2001 22:50:39 +0000 |
| Subject: | Re: A php's patch for support xhtml | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67231@lists.php.net to get a copy of this message | ||
[Andy Yu <is@gnuchina.org>]
> Hi.
> I don't think that php support xhtml well now, throught
> php-4.0.6 support <script language="php"> tag.
>
> I modify some php source, mainly about
> sapi_apache & zend language scanner.
> So that the xhtml file which comprises php code will
> be well xml formed.
>
> 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. IMHO we have more than enough start/end tags already.
- Stig
--
Stig Sæther Bakken <ssb@alltheweb.com>
Fast Search & Transfer ASA, Trondheim, Norway