PHP Wap Program Configuration

by bookmarkscjl on 2008-08-25 15:40:53

WAP Server Configuration

1. Modify the Apache's httpd.conf file and add the following content:

```

AddType application/x-httpd-php .wml

AddType text/vnd.wap.wml .wml; charset=gb2312

AddType image/vnd.wap.wbmp .wbmp

AddType application/vnd.wap.wmlc .wmlc

AddType text/vnd.wap.wmlscript .wmls

AddType application/vnd.wap.wmlscriptc .wmlsc

AddType application/java-archive .jar

AddType text/vnd.sun.j2me.app-descriptor .jad

```

2. Modify the Apache's mime.types file and add the following content:

```

text/vnd.wap.wml .wml

image/vnd.wap.wbmp .wbmp

application/vnd.wap.wmlc .wmlc

text/vnd.wap.wmls .wmls

application/vnd.wap.wmlsc .wmlsc

text/vnd.wap.wml wml

text/vnd.wap.wmlscript wmls

text/vnd.sun.j2me.app-descriptor

application/java-archive

application/vnd.wap.xhtml+xml xhtml

```

3. Test Code:

```php

\n");

echo("!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://wapforum.org/DTD/wml_1.1.xml\">\n");

echo ("\n\n");

echo date("l dS of F Y h:i A")."\n";

echo 'Hello World!';

echo ("\n\n");

?>

```

Note: Ensure that all paths and configurations are correctly set up in your environment for proper functioning.