Jump to content

domnode::append_child() expects parameter 1 to be object


seco

Recommended Posts

Hi

 

i try to write the following code

 

$doc = domxml_new_doc("1.0");
$node = $doc->create_element("para");
$newnode = $doc->append_child($node);                                // this line 71
$newnode->set_attribute("align", "left");

                      // this line is 72

 

it gives me error says:-

Warning: domnode::append_child() expects parameter 1 to be object, null given in C:\wamp\www\test.php on line 71

Fatal error: Call to a member function set_attribute() on a non-object in C:\wamp\www\test.php on line 72

 

 

any help?

 

thanks in advance.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.