WML,Apache,和 PHP 的介绍 |
|---|
| WAP技术站:www.wapease.com
|
AddType application/x-httpd-php3 .php3 .php .phtml .wml AddType application/x-httpd-php3-source .phps </IfModule> 这会用 PHP compiler 在所有的 .wml 页. 步骤 2 :去除Mark(Uncomment)apache Load Module 和 Add Module 变更: #LoadModule rewrite_module modules/mod_rewrite.so #AddModule mod_rewrite.c 成: LoadModule rewrite_module modules/mod_rewrite.so AddModule mod_rewrite.c 步骤 3 : 用 apache mod_rewrite module (只适用 1.2+版以上 ). 用这个,你可以即时的 rewite requested URL(当条件符合时). 需要把这片断码放在网页的底部. RewriteEngine On # Catch most WAP browsers RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR] # WinWAP, WAPjag RewriteCond %{HTTP_USER_AGENT} wap [OR] #Nokia emulators (sdk) RewriteCond %{HTTP_USER_AGENT} 7110 # Rewrite to where your wireless page is located RewriteRule ^[\./](.*)$ /home/mydirectory/wireless/home.wml [L] 现在要重新启动 apache server. 产生你第一个无线 WML/PHP 网页 Ok, 既然我们万事俱备, 让我们建立第一个网页。为了能正常运作,你需传送正确的 header 资讯. <?php # Send the header information<br> header("Content-type: text/vnd.wap.wml"); ?> # put in the wml code <wml> <card id='home'> <p> My first test page <p> </card> </wml> 你刚完成了你的第一个“简单”的无线网页。现在, 让我们试著更努力做一些较难的东西吧。 你需要检查你 WAP 兼容的网站设备。我使用 Phone.com 软件开发工具包, 它包含 UP.Simulator , 可以检查我的无线网页。选择不同的电话并且看他们的无线网页通过不同的设备时看起来的长像。 本新闻共2页,当前在第2页 1 2
|
| 上一篇:jsp制作wap网站时中文字符问题的一些解 下一篇:构建动态 WAP 站点 (1) - Server设置 |
|
