发新话题
打印

在Apache上简简单单开个WAP站点

在Apache上简简单单开个WAP站点

现在可以上网的手机越来越多, 要是可以随时在手机上面看到自己的网站的相关信息, 岂不是非常Happy么。
  现在就动手,其实很简单。
打开/path/to/httpd.conf:在最后添加以下配置内容

CODE:

[url=###][Copy to clipboard][/url]



#Wap MIME
AddType  text/vnd.wap.wml  .Wml
AddType  application/vnd.wap.wmlc .Wmlc
AddType  image/vnd.wap.wbmp .Wbmp
AddType  application/vnd.wap.wmlscriptc .wmlsc
AddType  text/vnd.wap.wmlscript .Wmls
AddType  application/vnd.wap/wmlscriptc .Wsc
然后使配置生效。

就这么简单,你的Apache已经可以支持Wap访问了。

来吧:手机打开http://我的网站/index.php,我靠,哪里支持啊。

对不起对不起,忘记说了,手机wap浏览器不是网页浏览器,恐怕整个手机的容量还没有网页浏览器的软件那么大。
用Wap浏览器就得遵守Wap的语言wml了,下面来个简单的例子:
在站点根目录建议wap,在wap里面建立test.wml,内容如下:

CODE:

[url=###][Copy to clipboard][/url]



<?xml version="1.0" encoding="GB2312"?>;
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">;

<wml>;
<!-- Possible <head>; element here. -->;
<head>;
<meta forua="true" http-equiv="Cache-Control" c/>;
<meta forua="true" http-equiv="Cache-Control" c/>;
</head>;
<template>;
<!-- Template implementation here. -->;
<do type="prev">;<prev/>;</do>;
</template>;
<card id="card1" title="wap" newc>;
<p>;
<b>;输入:</b>;<br/>;
<input name="SID" size="10" maxlength="50" type="text" format="*N" emptyok="true"/>;<br/>;
<br/>;
<anchor title="login">;
<go href="request.asp" method="post">;
<postfield name="code" value="$SID"/>;
</go>;Implement!<br/>;
</anchor>;
</p>;
</card>;
</wml>;
春天来了,我把一个美女埋在地里;     到了秋天,我就可以收获很多很多的美女了
手机浏览站点很不错!~

TOP

现在手机 看网页要钱么/?
发新话题