Re: WML/WAP and PHP
| From: | Pavel Kalian | Date: | Tue, 16 Jan 2001 13:40:22 +0000 |
| Subject: | Re: WML/WAP and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-34815@lists.php.net to get a copy of this message | ||
Hi Rick,
you are not doing anything wrong. You just have to send the proper
content-type depending on what you're outputing. For example if you want to
produce a gif image you have to use header("Content-type: image/gif");
There's nothing wrong with it as PHP can't predict what you want to do.
text/html is set as default simply because it's the type most users in most
cases need.
Pavel
----- Original Message -----
From: "Rick Hodger" <rick@domainsbuy.com>
To: <php-general@lists.php.net>
Sent: Tuesday, January 16, 2001 2:10 PM
Subject: [PHP] WML/WAP and PHP
> Here's a fun little thing I discovered, possibly a bug in PHP itself?
>
> To output a WAP page you must output a content-type header else the
phone's
> browser won't recognise the page. Dead simple. Use:
>
> header("Content-type: text/vnd.wap.wml");
>
> And all is well and good as long as you use echo/printf etc to output your
> page. The second you deviate out of PHP and back to HTML the content-type
> gets overwritten with a text/html, and so the page doesn't work. ASP used
> to be able to cope with this, is it a bug or something I'm doing wrong?
>
> --
> Rick Hodger
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>