PDA

View Full Version : PHP ... need help....


Dr_s99
02-06-05, 04:44 PM
Hello,
i have this code

<?php
$doc = new_xmldoc("1.0");
// Adding root node
$root = $doc->add_root("Book");
// Setting attribute for the root node
$root->set_attribute("Title","XML and PHP");
// Adding children to the root node
$title = $root->new_child("Author","John Williams");
$author = $root->new_child("Price","145");
$date = $root->new_child("PublishingDate", date("d-M-Y", mktime()));
echo $doc->dumpmem();
print "$new_xmldoc";
$fp = fopen("/var/www/html/add.xml", "w+");
fwrite($fp, $doc->dumpmem(), strlen($doc->dumpmem()));
return $xml;
?>


I keep getting this error...
Fatal error: Call to undefined function: domxml_doc_doctype()


my php version is 4.3.9

de><ta
02-06-05, 06:21 PM
Check in your PHP folder to see if such a function is made available.

I checked it up on google and it seems to be a common problem:
http://zugeschaut-und-mitgebaut.de/php/notpub.html