简单的html dom破坏大的html文件 [英] simple html dom scrapping large html file
问题描述
我需要删除一个大的html文件(例如: - http://www.indianrail。 gov.in/mail_express_trn_list.html )使用简单的html dom。我从一个简单的脚本开始。
i need to scrap a large html file (eg:- http://www.indianrail.gov.in/mail_express_trn_list.html ) using simple html dom . i started with a simple script..
<?php
require "simple_html_dom.php";
echo file_get_html('http://www.indianrail.gov.in/mail_express_trn_list.html')->plaintext;
?>
它什么都不显示,只是一个空白的页面,其中含有错误信息在Apache error.log文件中>
which shows nothing , just a blank page with the error message in Apache error.log file
PHP Notice: Trying to get property of non-object in /var/www/index.php on line 3
PHP Notice: Trying to get property of non-object in /var/www/index.php on line 3
同时所有其他页面(例如: - http://www.indianrail.gov.in/ special_trn_list.html )使用相同的脚本正常工作。
需要帮助
at the same time all other pages ( eg:- http://www.indianrail.gov.in/special_trn_list.html ) works fine with the same script . need help on this
提前感谢
推荐答案
p>问题似乎是 simple_html_dom
中定义的 MAX_FILE_SIZE
。
The issue appears to be MAX_FILE_SIZE
defined in simple_html_dom
.
您可以通过在simple_html_dom.php文件中编辑 define('MAX_FILE_SIZE',600000);
行进行调整。
you can adjust it by editing define('MAX_FILE_SIZE', 600000);
line in simple_html_dom.php file.
这篇关于简单的html dom破坏大的html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!