Code
Load ($URL); Print
"; Print ($dom->savexml ()); $dictArray = $dom getElementsByTagName ("dict"); foreach ($dictArray as $dict) {$key = $dict -getElementsByTagName ("key"); $key = NodeValue, $key, item (0); $key = Iconv ("UTF-8", "GB2312", $key); Note to transcode for Chinese, because XML defaults to UTF-8 format echo ("* * * Output >key> content: * * *:". $key); $lang = $dict getElementsByTagName ("Lang"); $lang = Utf8_decode ($lang, item (0), Nodevalu e); echo "
" ; Echo ("* * * Output >lang> content: * * *:".) $lang); }?> Customer feedback above code blank, Apache error log below
PHP Parse error:parse error, unexpected t_object_operator in/var/www/vhosts/xxh.com/httpdocs/test.php on line 11
Content-type:text/html
x-powered-by:php/4.3.9
Later uploaded to the PHP5.1 version found normal.
PHP 4.3.9 has a problem
PHP 5.1.6 (CLI) No problem