php - Cannot create DOMdocument -
i cannot create new domdocument using:
$dom = new domdocument;
the output empty. not empty object domdocument object( )
, empty. should object like:
domdocument object ( [doctype] => [implementation] => (object value omitted) [documentelement] => [actualencoding] => [encoding] => [xmlencoding] => [standalone] => 1 [xmlstandalone] => 1 [version] => 1.0 [xmlversion] => 1.0 [stricterrorchecking] => 1 [documenturi] => [config] => [formatoutput] => [validateonparse] => [resolveexternals] => [preservewhitespace] => 1 [recover] => [substituteentities] => [...] )
i'm using php version 5.6.7 , phpinfo()
says:
dom/xml: enabled dom/xml api version: 20031129 libxml version: 2.9.2`
there other php code on server / in script, can php running normally. advice next steps should find cause?
try this:
<?php $dom = new domdocument(); var_dump($dom); ?>
output:
object(domdocument)#1 (34) { ["doctype"]=> null ["implementation"]=> string(22) "(object value omitted)" ["documentelement"]=> null ["actualencoding"]=> null ["encoding"]=> null ["xmlencoding"]=> null ["standalone"]=> bool(true) ["xmlstandalone"]=> bool(true) ["version"]=> string(3) "1.0" ["xmlversion"]=> string(3) "1.0" ["stricterrorchecking"]=> bool(true) ["documenturi"]=> null ["config"]=> null ["formatoutput"]=> bool(false) ["validateonparse"]=> bool(false) ["resolveexternals"]=> bool(false) ["preservewhitespace"]=> bool(true) ["recover"]=> bool(false) ["substituteentities"]=> bool(false) ["nodename"]=> string(9) "#document" ["nodevalue"]=> null ["nodetype"]=> int(9) ["parentnode"]=> null ["childnodes"]=> string(22) "(object value omitted)" ["firstchild"]=> null ["lastchild"]=> null ["previoussibling"]=> null ["attributes"]=> null ["ownerdocument"]=> null ["namespaceuri"]=> null ["prefix"]=> string(0) "" ["localname"]=> null ["baseuri"]=> null ["textcontent"]=> string(0) "" }
Comments
Post a Comment