Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using PHP to generate WML

Status
Not open for further replies.

frosty1575

Programmer
Apr 15, 2001
1
CH
Hello all,

I recently upgraded from PHP3 to PHP4 and it seems that the header() function doesn't work propoerly

In order to generate WML with PHP, you need to insert the

header("Content-type: text/vnd.wap.wml");

before sending anything to the browser

This was working fine with PHP3 but now my phone returns me the message : "Unsupported Content-Type : text\html".
I don't understand why PHP still sends HTML headers.

I would be grate ful to anyone who could help me !

Have a nice day

Thomas
 
I believe that you must turn off the short_open_tag in the PHP.ini file to produce WML/WAP/XML pages. Of course when you do this you have to use <?php ?> instead of <? ?>

Once you turn off the short tags,
<?php header(&quot;Content-type: text/vnd.wap.wml&quot;); ?>
should send the proper headers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top