Re: Why create_element function always return false?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, May 4, 2007 9:44 pm, Victor wrote:
> <?php
> $doc = domxml_new_doc("1.0");

var_dump($doc);

> $node = $doc->create_element("para");

var_dump($node);

> $newnode = $doc->append_child($node);

var_dump($newnode);

> $newnode->set_attribute("align", "left");
> ?>
>
> I just run the example that is from php manual. But there is some
> error

Presumable http://php.net/domxml_new_doc documents what happens when
there is an error, and how to deal with it.

The PHP samples are just that:  samples

You have to add about 5 X as much code to have a robuts error-handling
won't make your life miserable application...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux