PHP版为什么没有wap开发呀 偶也是用php写的wap有空大家交流啊我的QQ 5747569 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 若是用LINUX手机,PHP以后倒是有可能用WAP开发 php 做wap不难,只是wap的格式要求有点严格.另外就是编码方面可能有点问题 偶来贡献啊下面这个是偶自己用的,嘿嘿。wap.wapcity.uni.cc上面这个是我的手机论坛,大家交流啊我的QQ 5747569<?php/* * aNErG`s PHP * * Copyright (c) 2002-2003 * * E-mail:[email protected] * */ class wap{ function head() { $head =header("Content-type:text/vnd.wap.wml"); $head.="<?xml version=\"1.0\" encoding=\"gb2312\"?>"; $head.="\r\n"; $head.="<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; $head.="\r\n"; $head.="<wml>"; $head.="\r\n"; echo $head; } function nocache() { $nocache ="\r\n"; $nocache.= "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\"/></head>"; $nocache.="\r\n"; echo $nocache; } function card($id,$title) { $card = "<card id=\"$id\" title=\"$title\">"; $card.= "\r\n"; echo $card; } function ontime_url($id,$title,$url,$value) { $ontime_url = "<card id=\"$id\" title=\"$title\" ontimer=\"$url\">"; $ontime_url.= "\r\n"; $ontime_url.= "<timer value=\"$value\"/>"; $ontime_url.= "\r\n"; echo $ontime_url; } function foot() { $foot = "\r\n"; $foot.= "</card>"; $foot.= "\r\n"; $foot.= "</wml>"; echo $foot; } function p($str,$align="left") { $p = "<p align=\"$align\">"; $p.= $str; $p.= "</p>"; $p.= "\r\n"; echo $p; } function prev($str) { $prev = "<anchor><prev/>$str</anchor>"; echo $prev; } function link($url,$str) { $link = "<a href=\"$url\">$str</a>"; echo $link; } function img($url,$alt) { $img.= "<img src=\"$url\" alt=\"$alt\"/>"; echo $img; } function br() { echo "<br/>"; } function input($name,$type="text",$format="",$maxlength="10",$emptyok="false") { echo "<input name=\"$name\" type=\"$type\" format=\"$format\" maxlength=\"$maxlength\" emptyok=\"$emptyok\" />"; } function Wrong($str) { $this->card("Wrong","出错啦"); if ($str=="post") { $this -> p("请填写所有的内容!"); } if ($str=="note") { $this -> p("不要TK别人的内容哦!"); } echo "<p>"; $this -> prev("返回"); echo " "; $this -> link("./","首页"); echo "</p>"; $this -> foot(); exit; }}$wap = new wap();?> wap就是输出wap格式的xml,,,用什么做都一样的,,,不过wap好象正在淘汰中,因为以后新出的彩屏手机大多会支持java的标准html浏览器 搞PHP 与 linux关系大麽 求解 公司让我做如下几个功能,该怎么做?第一次做项目啊,求救! 二分查找 checkbox血泪史 没辙了,请教个smarty的问题,先感谢! 关于php远程连接ORACLE的问题 数据库算法问题请教,欢迎大家一起讨论! 配置问题 数值格式化 欢迎大家参观我新近搞好的论坛。 谁能提供一个全部用phplib开发的包括原代码的系统(60分全送上了) 怎样上传图片?
另外就是编码方面可能有点问题
下面这个是偶自己用的,嘿嘿。
wap.wapcity.uni.cc
上面这个是我的手机论坛,大家交流啊
我的QQ 5747569<?php
/*
* aNErG`s PHP
*
* Copyright (c) 2002-2003
*
* E-mail:[email protected]
*
*/
class wap
{
function head()
{
$head =header("Content-type:text/vnd.wap.wml");
$head.="<?xml version=\"1.0\" encoding=\"gb2312\"?>";
$head.="\r\n";
$head.="<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
$head.="\r\n";
$head.="<wml>";
$head.="\r\n";
echo $head;
}
function nocache()
{
$nocache ="\r\n";
$nocache.= "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\"/></head>";
$nocache.="\r\n";
echo $nocache;
}
function card($id,$title)
{
$card = "<card id=\"$id\" title=\"$title\">";
$card.= "\r\n";
echo $card;
}
function ontime_url($id,$title,$url,$value)
{
$ontime_url = "<card id=\"$id\" title=\"$title\" ontimer=\"$url\">";
$ontime_url.= "\r\n";
$ontime_url.= "<timer value=\"$value\"/>";
$ontime_url.= "\r\n";
echo $ontime_url;
}
function foot()
{
$foot = "\r\n";
$foot.= "</card>";
$foot.= "\r\n";
$foot.= "</wml>";
echo $foot;
}
function p($str,$align="left")
{
$p = "<p align=\"$align\">";
$p.= $str;
$p.= "</p>";
$p.= "\r\n";
echo $p;
}
function prev($str)
{
$prev = "<anchor><prev/>$str</anchor>";
echo $prev;
}
function link($url,$str)
{
$link = "<a href=\"$url\">$str</a>";
echo $link;
}
function img($url,$alt)
{
$img.= "<img src=\"$url\" alt=\"$alt\"/>";
echo $img;
}
function br()
{
echo "<br/>";
}
function input($name,$type="text",$format="",$maxlength="10",$emptyok="false")
{
echo "<input name=\"$name\" type=\"$type\" format=\"$format\" maxlength=\"$maxlength\" emptyok=\"$emptyok\" />";
}
function Wrong($str)
{
$this->card("Wrong","出错啦");
if ($str=="post") {
$this -> p("请填写所有的内容!");
}
if ($str=="note") {
$this -> p("不要TK别人的内容哦!");
}
echo "<p>";
$this -> prev("返回");
echo " ";
$this -> link("./","首页");
echo "</p>";
$this -> foot();
exit;
}
}
$wap = new wap();
?>