WML/WAP and PHP
| From: | Rick Hodger | Date: | Tue, 16 Jan 2001 13:10:31 +0000 |
| Subject: | WML/WAP and PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34810@lists.php.net to get a copy of this message | ||
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