PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- function editcontent($file, $array){
- exit;
- $root = $dom->document_element();
- $content = $root->child_nodes();
- foreach($content as $news)
- {
- if ($news->tagname == 'news')
- {
- $currentnews = $news->get_attribute('id');
- if ($currentnews == $array["id"] ){
- $news_info = $news->child_nodes();
- foreach ($news_info as $child)
- {
- if ($child->tagname == "link") $child->set_content($array["link"]);
- if ($child->tagname == "rating") $child->set_content($array["rating"]);
- if ($child->tagname == "title") $child->set_content($array["title"]);
- }
- }
- }
- }
- $xmlfile = $dom->dump_mem(true);
- {
- return('error');
- exit;
- }
- };