用PHP做WAP(WML)开发要注意的

在PHP脚本中加上

Header(“Content-type: text/vnd.wap.wml”);
Header(“Cache-Control: no-cache, must-revalidate”);
Header(“Pragma: no-cache”);

这些来告诉浏览器这是WML文件,如果你的php配置文件,short_open_tag的设置为on的话,那么WML文档开头的XML标记就不能直接写了,否则服务器会认为是PHP,我们可以直接echo<?xml  ……?>这段。

WML具体语法可以去w3school中学习,或者直接找个WAP页面来模仿。提示一下,opera可以直接打开wml文档,我们可以用这个浏览器来测试我们生成的wml文档,开发工具,我没有去找适合写WML的,因为我只说做个简单的页面而已。

此条目发表在 PHP, WEB 分类目录,贴了 , , 标签。将固定链接加入收藏夹。

用PHP做WAP(WML)开发要注意的》有 3 条评论

  1. GarykPatton 说:

    I think I will try to recommend this post to my friends and family, cuz it’s really helpful.

  2. CrisBetewsky 说:

    It’s a pity that people don’t realize the importance of this information. Thanks for posing it.

  3. essay 说:

    Hi. I like the way you write. Will you post some more articles?

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>