×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    1

    PHP + XHTML: Opens with Nokia notepad

    Hello, i?m getting crazy with a problem on my WAP site.
    I use PHP to connect to the database and get the info to show.
    I have to versions to display. The WML version goes OK when I access the .php file from my Nokia 7650:

    <?php

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

    echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
    ."<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"
    ."<wml>\n\n"
    ."<card id=\"Card01\" title=\"Title\">\n"
    ."<p>\n";


    echo ' <a href="mysite.com">
    Wapnuke home page</a>
    <br/><img src="image.wbmp" alt="World Cup" />';

    echo "</p>"
    ."</card>\n"
    ."</wml>";
    ?>


    But in the XHTML version, only the Internet browsers show the page correctly. When I try to open the .php from my 7650, suddenly it opens the source code with the Nokia notepad... I don?t know what else to do.. I tried multiple combinations of headers sent, even try to re-configure the .htaccess but nothing..

    <?php

    header("Content-type: text/html");
    header("Content-type: application/xhtml+xml");
    header("Content-type: application/vnd.wap.xhtml+xml");

    echo '

    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>2002 World Cup</title>
    <!--
    Change href="style.css" below to the file name and
    relative path or URL of your external style sheet.
    -->
    <link rel="stylesheet" href="style.css" type="text/css"/>
    <!--
    <style> document-wide styles would go here </style>
    -->
    </head>
    <body>
    <h1>Testing</h1>
    <p>
    <img src="image.gif" alt="World Cup" />


    </p>
    <ul>
    <li><a href="groups.xhtml">Groups</a></li>
    <li><a href="schedule.xhtml">Stage 2 Schedule</a></li>
    <li><a href="locations.xhtml">Locations</a></li>
    <li><a href="funfacts.xhtml">Fun Facts</a></li>
    </ul>
    </body>
    </html>

    ';

    ?>


    I try (in example) to send only header("Content-type: text/html"); but then it loads the page but in plain text, without images, styles, nothing... Any other way, the xhtml is opened with the Nokia notepad.

    Please, some of you must know what I?m doing wrong!!

    Thank you in advance.

    Roberto.

  2. #2
    Registered User
    Join Date
    Nov 2003
    Posts
    3
    7650 does not support xtml!

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    2

    Re: PHP + XHTML: Opens with Nokia notepad

    Quote Originally Posted by xonsuns View Post
    Hello, i?m getting crazy with a problem on my WAP site.
    I use PHP to connect to the database and get the info to show.
    I have to versions to display. The WML version goes OK when I access the .php file from my Nokia 7650:

    <?php

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

    echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
    ."<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"
    ."<wml>\n\n"
    ."<card id=\"Card01\" title=\"Title\">\n"
    ."<p>\n";


    echo ' <a href="mysite.com">
    Wapnuke home page</a>
    <br/><img src="image.wbmp" alt="World Cup" />';

    echo "</p>"
    ."</card>\n"
    ."</wml>";
    ?>


    But in the XHTML version, only the Internet browsers show the page correctly. When I try to open the .php from my 7650, suddenly it opens the source code with the Nokia notepad... I don?t know what else to do.. I tried multiple combinations of headers sent, even try to re-configure the .htaccess but nothing..

    <?php

    header("Content-type: text/html");
    header("Content-type: application/xhtml+xml");
    header("Content-type: application/vnd.wap.xhtml+xml");

    echo '

    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>2002 World Cup</title>
    <!--
    Change href="style.css" below to the file name and
    relative path or URL of your external style sheet.
    -->
    <link rel="stylesheet" href="style.css" type="text/css"/>
    <!--
    <style> document-wide styles would go here </style>
    -->
    </head>
    <body>
    <h1>Testing</h1>
    <p>
    <img src="image.gif" alt="World Cup" />


    </p>
    <ul>
    <li><a href="groups.xhtml">Groups</a></li>
    <li><a href="schedule.xhtml">Stage 2 Schedule</a></li>
    <li><a href="locations.xhtml">Locations</a></li>
    <li><a href="funfacts.xhtml">Fun Facts</a></li>
    </ul>
    </body>
    </html>

    ';

    ?>


    I try (in example) to send only header("Content-type: text/html"); but then it loads the page but in plain text, without images, styles, nothing... Any other way, the xhtml is opened with the Nokia notepad.

    Please, some of you must know what I?m doing wrong!!

    Thank you in advance.

    Roberto.
    I had the same problem, please help us !

Posting Permissions

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