Home >Backend Development >PHP Tutorial >Detailed explanation of PHP+WAP mobile website development environment configuration_PHP tutorial
1. A mobile terminal (such as a WAP mobile phone) with WAP user agent function sends a WAP service request to a certain website through the micro-browser running internally. The request is first intercepted by the WAP gateway, which encodes and compresses the information content to reduce network data traffic. At the same time, the WAP protocol is converted into the HTTP protocol as needed. ”);
2. The protocol forwards the processed request to the corresponding WAP server. On the WAP server side, based on the page extension and other attributes, the requested page is output directly or after being interpreted by a server-side script, and then transmitted back to the user through the gateway.
Having introduced some knowledge, let’s start setting up the development environment. Because I use php and apache to develop wap sites. So add the following part to the AddType section of apache's http.conf file.
AddType text/vnd.wap.wml .wml
AddType application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.wmls .wmls
AddType application/vnd.wap.wmlsc .wmlsc
AddType image/vnd.wap.wbmp .wbmp
AddType image/vnd.wap.wbmp .wbmp
Restart Apache, it’s OK
Test code
header(”Content-type: text/vnd.wap.wml”);
echo(”
”);
echo “
";
echo ("
echo date(”l dS of F Y h:i A”).”
”;
echo ‘Hello World!, Hello’;
echo (”
?>