帮忙看一个小函数 不懂,该怎么处理

WBOY
Release: 2016-06-13 13:48:57
Original
715 people have browsed it

帮忙看一个小函数 不懂

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
    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();            
    }


Copy after login

不明白什么意思。。

------解决方案--------------------
上面不已经有注释了吗? 创建一个xml文件 并且将状态信息添加到xml里,返回xml 如果有错误将返回false.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template