帮忙把阿信的ASP2PHP!!!! 用mdb 数据库吗?用PHP去连接吗???? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个可以改用mysql啊怎么代码这么乱啊 肯定有错误的。我就是一行一行改过来的~~~~~ 用的ADODB。~~<?phpheader("Content-type: text/xml");header("Content-Charset: gb2312"); // 这里不知道该怎么写,你自己查资料header("Expires: "); //这里也一样。~~~function XmlHttpResponse(){ global $db; $NodeID=$_GET["id"]; $ResponseXml="<?xml version='1.0' encodeing='gb2312'?>\r\n"; $ResponseXml.="<TreeNode id=\"".$NodeID."\"\r\n"; if(!$NodeID){ $sql="select *,(select count(*) from deeptree where parentid=dtree.id) as children from deeptree dtree where parentid=".$NodeID; $result=$db->Execute("$sql") or die (" Query $sql error! "); while($result->fields[0]){ $ResponseXml.="<TreeNode id='".$result->fields["id"]."' text='".$result->fields["description"]."' href='".$result->fields["href"]?$result->fields["href"]:''."' title='".$result->fields["description"]."' target='_self'>\r\n"; if($result->fields["children"]>0) $ResponseXml.="<tree/>\r\n"; $ResponseXml.="</TreeNode>\r\n"; $result->MoveNext(); } } $ResponseXml.="</TreeNode>\r\n"; returen $ResponseXml;}echo XmlHttpResponse();?> Response.contentType="text/xml"Response.charset="gb2312";Response.expires=0;===>header ("Content-Type: text/xml"); header("Content-Type: charset=gb2312");//上两句可合写成 header("Content-Type: text/xml; charset=gb2312");header("Expires: 0"); 这是jscript代码,与php极其接近翻译时注意:1、每行结束必须要有“;”2、变量名前加“$”3、“+”改成“.”4、对象成员的引用符由“.”改成“->”5、Server.CreateObject ==> new comServer.mappath ==> realpath其他就没有什么了 用curl做虚拟登陆的应该怎么检查是否登录进去比较靠谱? 为什么大型网站需要那么多服务器? 这段代码是什么编码亚? 如何能下载一个页面的php文件 求一个图片上传的代码......... asp程序轉為PHP 哪个有phplib模板?发给俺一个中不?谢谢! 请问用PHP处理这个问题? 如何使用全局变量? 这种只有科学家才懂的话,到底是啥意思哈 怎么让APACHE支持URL后面跟?name=中文? 如何做一页404.htm呢
怎么代码这么乱啊
<?phpheader("Content-type: text/xml");
header("Content-Charset: gb2312"); // 这里不知道该怎么写,你自己查资料
header("Expires: "); //这里也一样。~~~function XmlHttpResponse()
{
global $db;
$NodeID=$_GET["id"]; $ResponseXml="<?xml version='1.0' encodeing='gb2312'?>\r\n";
$ResponseXml.="<TreeNode id=\"".$NodeID."\"\r\n";
if(!$NodeID){
$sql="select *,(select count(*) from deeptree where parentid=dtree.id) as children from deeptree dtree where parentid=".$NodeID;
$result=$db->Execute("$sql") or die (" Query $sql error! "); while($result->fields[0]){
$ResponseXml.="<TreeNode id='".$result->fields["id"]."' text='".$result->fields["description"]."' href='".$result->fields["href"]?$result->fields["href"]:''."' title='".$result->fields["description"]."' target='_self'>\r\n";
if($result->fields["children"]>0) $ResponseXml.="<tree/>\r\n";
$ResponseXml.="</TreeNode>\r\n";
$result->MoveNext();
}
}
$ResponseXml.="</TreeNode>\r\n"; returen $ResponseXml;
}echo XmlHttpResponse();
?>
Response.charset="gb2312";
Response.expires=0;
===>
header ("Content-Type: text/xml");
header("Content-Type: charset=gb2312");
//上两句可合写成 header("Content-Type: text/xml; charset=gb2312");
header("Expires: 0"); 这是jscript代码,与php极其接近
翻译时注意:
1、每行结束必须要有“;”
2、变量名前加“$”
3、“+”改成“.”
4、对象成员的引用符由“.”改成“->”
5、
Server.CreateObject ==> new com
Server.mappath ==> realpath
其他就没有什么了