<?php //.... //funkcja switch... case "articles": $table=$doc->appendChild($doc->createElement("table")); $table->setAttribute("class","arts"); $art=new arts($row['id']); $tr=$table->appendChild($doc->createElement("tr")); $tdId=$tr->appendChild($doc->createElement("td",$row['id'])); $tdName=$tr->appendChild($doc->createElement("td")); $link=$tdName->appendChild($doc->createElement("a",$art->getData("title"))); $link->setAttribute("href","/czytaj/" . $art->getData("url") . "/"); //to powoduje błąd!! $tdActions=$tr->appendChild($doc->createElement("td")); $editLink=$tdActions->appendChild($doc->createElement("a")); $editLink->setAttribute("href","index.php?section=add_article&id=" . $row['id']); $editImg=$editLink->appendChild($doc->createElement("img")); $editImg->setAttribute("src","images/edit.png"); $delLink=$tdActions->appendChild($doc->createElement("a")); $delLink->setAttribute("href","index.php?section=article&action=del_article&id=" . $row['id']); $delImg=$delLink->appendChild($doc->createElement("img")); $delImg->setAttribute("src","images/delete.png"); } $template->add("main.content",$doc->saveXML($table)); break; //...inne opcje case //...koniec funkcji //zwaca kod html ?>
Dlaczego linia oznaczona komentarzem powoduje to że nawet reszta kodu się nie nie wyświetla? Na domowym serwerze wszystko działa.