Re: PHP and WAP
| From: | Rasmus Lerdorf | Date: | Wed, 24 May 2000 08:43:46 +0000 |
| Subject: | Re: PHP and WAP | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19364@lists.php.net to get a copy of this message | ||
> The most correct way to configure the web server is to add the following 5
> mime-types to the server configuration file: Content MIME type Extension WML
> source, Compiled WML, WMLScript source, Compiled WMLScript and Wireless bitmap
> accordingly:
>
> text/vnd.wap.wml Wml
> Application/vnd.wap.wmlc Wmlc
> text/vnd.wap.wmlscript Wmls
> Application/vnd.wap.wmlscriptc Wmlsc
> image/vnd.wap.wbmp wbmp
>
> Now my question: PHP syntax, as we know, is <? application code ?>. How do
> we get around this for the conflicting WML syntax <?xml version="1.0">, short
> of turning off "short_open_tag" in php.ini? [Perhaps if PHP were to not
> evaluate <?xml as the start of PHP application code?]
What do you mean short of turning off short_open_tag? That is exactly the
reason the ability to turn off that tag style was added. Ignoring <?xml
at the start of a tag would be a bit of a hack. Imagine this code:
<?xml($foo)?>
Perfectly valid PHP code, but it wouldn't get executed.
Just turn off the short tags and use <?php ... ?> for your PHP
blocks. That is the correct solution.
-Rasmus