SimpleXMLElement::addAttribute (PHP5>=5.1.3,PHP7) SimpleXMLElement::addAttribute-向SimpleXML元素添加一个属性 描述
phpinclude 'example.php';$sxe = new SimpleXMLElement($xmlstr);$sxe->addAttribute('type', 'documentary
prefix,string$ns) publicstring__toString(void) publicarrayxpath(string$path) } 目录 SimpleXMLElement::addAttribute
options=0[,bool$data_is_url=false[,string$ns="",bool$is_prefix=false]]]) publicvoidSimpleXMLElement::addAttribute