首页 > 开发 > PHP > 正文

php开发wap常用技巧

2024-05-04 22:58:41
字体:
来源:转载
供稿:网友
国内最大的酷站演示中心!

在php中输出返回上一级的代码:
echo "<a href=".$_server["http_referer"].">点击这里返回</a>";
在wap中的代码是:
<?php
@header("content-type:text/vnd.wap.wml");
?>
<?xml version="1.0" encoding="utf-8"?>
<!doctype wml public "-//wapforum//dtd wml 1.3//en" "http://www.wapforum.org/dtd/wml13.dtd">
<wml>
<head>
<meta http-equiv="expires" content="0" />
</head>
<card title="输入标题">
<do type="prev" label="返回上页">
<prev/>
<!--provide a button you can clink to back a step-->
</do><br/>
<!--<anchor>
<prev/>后退
</anchor>--> 
</card>
</wml>
在wap中打电话的代码:
<?php
 @header("content-type:text/vnd.wap.wml");
?>
<?xml version="1.0" encoding="utf-8"?>
<!doctype wml public "-//wapforum//dtd wml 1.3//en" "http://www.wapforum.org/dtd/wml13.dtd">
<wml>
<head>
<meta http-equiv="expires" content="0" />
</head>
<card title="标题">
<p>
<input name="phone_no" format="*m" value="13"/>
<do type="option" >
<go href="wtai://wp/mc;$(phone_no)"/>
</do><br/>
或者
<a href="wtai://wp/mc;13333333333">拨打电话</a>
<br />
</p>
</card>
</wml>


加入wap书签

<?xml version="1.0"?>
<!doctype characteristic-list system "/dtd/characteristic_list.xml">
<characteristic-list>
<characteristic type="address">
<parm name="bearer" value="gprs"/>
<parm name="proxy" value="10.0.0.172"/>
<parm name="port" value="9201"/>
<parm name="gprs_accesspointname" value="wap.02826.com"/>
<parm name="ppp_authtype" value="pap"/>
</characteristic>
<characteristic type="name">
<parm name="name" value="wmzsoft gprs"/>
</characteristic>
<characteristic type="bookmark"/>
<parm name="name" value="02826"/>
<parm name="url" value=" http://wap.02826.com "/>
</characteristic>
</characteristic-list> 
 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表