Posted by Stephen Leaf on 09/29/05 20:40
On Thursday 29 September 2005 12:26 pm, Stephen Leaf wrote:
I have figured it out!
My guess couldn't have been more _wrong_.
Here is all you need to recreate the Error.
There is only 1 value that is off.
in the DOMDocument I gave it the wrong encoding type.
uft-8 .. it should read utf-8.
Interesting that PHP doesn't tell you about a bad encoding type.
<?php
class test {
private $Dom;
function __construct ($rootName) {
$this->Dom = new DOMDocument('1.0', 'uft-8');
$this->Dom->appendChild($this->Dom->createElement($rootName));
}
function __toString() {
return $this->Dom->saveXML();
}
}
$test = new test("test");
echo $test;
?>
Navigation:
[Reply to this message]
|