帮忙看一个小函数 不懂
php code function createstatus($status) { $root = $this->dom->createelement('root'); $this->dom->appendchild($root); //创建status标签 $statusinfo = $this->dom->createelement('status'); $root->appendchild($statusinfo); $statusinfovalue = $this->dom->createtextnode($status); $statusinfo->appendchild($statusinfovalue); //输出xml数据 return $this->dom->savexml(); }
不明白什么意思。。
------解决方案--------------------
上面不已经有注释了吗? 创建一个xml文件 并且将状态信息添加到xml里,返回xml 如果有错误将返回false.