函数simplexml_load_string()上的XML_PARSE_HUGE [英] XML_PARSE_HUGE on function simplexml_load_string()
问题描述
常量XML_PARSE_HUGE
可以作为第三个参数传递给 simplexml_load_string()
.根据 php.net 此标志:
The constant XML_PARSE_HUGE
can be passed as the third argument to simplexml_load_string()
. According to to php.net this flag:
从解析器中释放所有硬编码的限制.
relaxes any hardcoded limit from the parser.
解析器的默认硬编码限制"是什么?
What is the "default hardcoded limit from the parser"?
我认为放松也有点模棱两可.它会消除还是增加硬编码限制"?
I think relaxes is a little bit ambiguous also. Does it eliminate or increase "the hardcoded limit"?
推荐答案
来自 http://bugs.php.net /49660 :
由于版本2.7.3 libxml限制了 单个文本节点的最大大小为 10MB.可以使用 新选项XML_PARSE_HUGE. PHP没有 为libxml指定此选项的方法.
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.
所以我想这个标志就是PHP现在必须指定此选项的方式.
So I imagine this flag is the way that PHP now has to specify this option.
这篇关于函数simplexml_load_string()上的XML_PARSE_HUGE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!