×

Discussion Board

Results 1 to 2 of 2

Thread: Wml and Php

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    20

    Wml and Php

    Anyone could suggest me about this little 'hello world' PHP & wml page I'm attaching ? It doesn't work and I keep getting a 'compiler error' on my siemens s45 and with the sdk 5.1, whereas it works perfectly if I run the page with Gelon wap simulator...
    I hosted it on a php3 enabled free space, Lycos. You can find it here:

    <?
    header("Content-type: text/vnd.wap.wml");
    echo("n");
    echo("nn");
    ?>
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
    <wml>
    <card id="Card1" title="Wap-UK.com">
    <p>
    <!-- Hello World example -->
    Hello World
    </p>
    </card>
    </wml>

    Thanks a million,

    Fabio Parri

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere, Finland
    Posts
    67

    RE: Wml and Php

    Hi,

    Your WML code looks fine. It might be that your compiler doesn't understand the PHP code and that's why returns error message. Try however to replace your header with the following code and change the DTD version to WML 1.3 if you like.

    Also notice that PHP outputs possible error messages as HTML, which a WML browser will not understand.

    <?php
    header("Content-type: text/vnd.wap.wml");
    echo "<xml version="1.0"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    ?>

    <wml>
    your code comes here
    </wml>

    BR,
    Mika / Forum Nokia Developer Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×