我试图使用PHP的一部分的HTML Tidy实现(http://www.php.net/manual/en/book.tidy.php)为了重新格式化一大块HTML。我遇到了一个问题,其中Tidy将输出截断到某个点(大约8K)。PHP HTML Tidy:缓冲区的大小限制
当我创建一个字符串,它是关于10K长&把它交给tidy_repair_string,像这样:
$output = tidy_repair_string($output, array(
'indent' => true, // enforce indentation
'hide-comments' => true, // Remove the comments
'wrap' => 100, // Break each line after 100 chars
'output-html' => true, // Output as HTML
'char-encoding' => $encoding // The input/output encoding
), $encoding);
我之后8,070个字符的LOP断一切。如果我用10个字符填充字符串的开头,那么最后只剩10个字符。
有没有办法改变tidy_repair_string的缓冲区大小,使它更大?
看着http://www.php.net/manual/en/tidy.getconfig.php似乎没有配置选项,谷歌是非常无益的/我的谷歌福已经失败了我,并没有大量的文件围绕此。任何帮助将不胜感激!
编辑:我使用XAMPP的可移植精简版 - win32-1.8.1-VC9在Windows 7的问题仍然存在,甚至发生时,我改变php.ini文件使用memory_limit的= 900M
可能保存到文件并解析文件,而不是字符串? – StasGrin 2013-04-05 11:05:53