Please look at this simple dynamic code test.wml.
<?php header (“Content-type:text/vnd.wap/wml”)?>
<?xml version=“1.0”?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD
WML 1.1//EN””http://www.wapforum.org/
DTD/wml 1.1.xml”>
<wml>
<card>
<p>Hello, World!. Outside PHP</p>
<?php echo “Hello, World!. Inside PHP”; ?>
</card>
</wml>
When I tried to execute this code as http://localhost/test.wml, it displays all non-php codes but the contents within the php tags
<?php .....?> is not displayed.
Output in NOKIA 5100 SDK:
Hello, World!. Outside PHP
I used NOKIA 5100 SDK ,NOKIA 7200 SDK and NMIT 4.0 simulators from forum.NOKIA.com , KlonDike Wap Browser, Opera 7 browser and Up.simulator from Phone.com for the execution. But it didn't work in all cases.
Operating System : Windows Xp with service pack 1a
For PHP, I used EasyPHP that has following settings:
easyphp 1.7 : apache 1.3.27 - php 4.3.3 - mysql 4.0.15 - phpmyadmin 2.5.3
The required MIME types in the httpd.conf file has been added at its end as:
MIME Types for WAP
AddType application/x-httpd-php .wml
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
End MIME Types for WAP
What is the problem with the above code and configurations ?
Where else do I need to make changes in configurations ?
I don't think it is OS dependant. Or is it really ?
I have also tried using the following prolog.
<?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\">");
?>
But all in vain. Please suggest me what should I do ?