Different result when adding Header function to set the Content-type document

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eros
    New Member
    • Jun 2007
    • 66

    Different result when adding Header function to set the Content-type document

    page1.php (with header function)
    [PHP]<?php
    header("Content-type: text/vnd.wap.wml");
    print "<?xml version=\"1.0\" encoding=\"Shif t-JIS\"?>";
    $test = 123;
    ?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.or g/DTD/wml_1.1.xml">
    <wml>
    <card id="card1" title="Tutorial ">
    <p>
    <fieldset title="住所" >
    <small>検索する時に市区 郡町村を書いてリン クを押す。</small><br/>
    〒:<input type="text" name="custpostc ode" value="<?php echo $test ?>" maxlength="8"/>
    〒:<input type="text" name="custpostc ode" value="456" maxlength="16"/>
    </fieldset>
    </p>
    </card>
    </wml>[/PHP]
    Output:


    page2.php (without header function)
    [PHP]<?php
    //header("Content-type: text/vnd.wap.wml");
    print "<?xml version=\"1.0\" encoding=\"Shif t-JIS\"?>";
    $test = 123;
    ?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.or g/DTD/wml_1.1.xml">
    <wml>
    <card id="card1" title="Tutorial ">
    <p>
    <fieldset title="住所" >
    <small>検索する時に市区 郡町村を書いてリン クを押す。</small><br/>
    〒:<input type="text" name="custpostc ode" value="<?php echo $test ?>" maxlength="8"/>
    〒:<input type="text" name="custpostc ode" value="456" maxlength="16"/>
    </fieldset>
    </p>
    </card>
    </wml>[/PHP]
    Output:


    Probem:
    1) The output value in input control is not the expected value.
    2) Not the same display.

    Configurations:
    Opera 9.22 (WML Browser)
    Windows XP SP2 Japanese Version
    Zend Studio 5.0
    PHP 5.2.3
    Apache 2.2.4
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, eros.

    My guess is that the problem lies in how Opera handles that content-type. Have you tried it in other browsers?

    Comment

    Working...