XML_PARSE_HUGE on function simplexml_load_string()

倾然丶 夕夏残阳落幕 提交于 2019-12-01 17:56:42

From http://bugs.php.net/49660:

Since version 2.7.3 libxml limits the maximum size of a single text node to 10MB. The limit can be removed with a new option, XML_PARSE_HUGE. PHP has no way to specify this option to libxml.

So I imagine this flag is the way that PHP now has to specify this option.

time has moved: http://php.net/manual/en/libxml.constants.php

LIBXML_PARSEHUGE - Sets XML_PARSE_HUGE flag, which relaxes any hardcoded limit from the parser. This affects limits like maximum depth of a document or the entity recursion, as well as limits of the size of text nodes.
Only available in Libxml >= 2.7.0 (as of PHP >= *5.3.2 and PHP >= 5.2.12)*

//example of use
$xmlDoc = new DOMDocument();
$xmlDoc->loadXML( $xml , LIBXML_PARSEHUGE );
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!