最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php dom增加xml节点函数
时间:2022-06-24 20:53:03 编辑:袖梨 来源:一聚教程网
| 代码如下 | 复制代码 | 
| function: addcomment adds a comment. parameters: $data - associative array of data, must contain 'name', 'website', 'comment', 'date', 'user_ip', 'user_agent', and 'spam'. returns: id of the new comment. ]> */ public function addcomment($data) { $xml = new simplexmlelement($this->getcontents(true)); $message = $xml->addchild('message'); $id = $this->generateid(); $message->addattribute('mid', $id); foreach ($data as $key => $value) { $message->addchild($key, htmlspecialchars($value, ent_quotes)); } $this->putcontents($xml->asxml()); return $id; } | |
相关文章
- 黑色四叶草魔法帝之道幻影殿堂怎么打 幻影殿堂打法教学 10-31
- 二重螺旋怎么更换角色 角色更换方法 10-31
- 伊莫花舞兰怎么样 花舞兰角色介绍 10-31
- 星塔旅人强化机在哪 强化机位置一览 10-31
- 星塔旅人等级怎么突破 等级突破方法 10-31
- 辉烬知世怎么配队 知世配队攻略 10-31
 
             
                                 
                                 
                                 
                                 
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                        