我需要使用简单的html dom 刮一个大的html文件(例如:http://www.indianrail.gov.in/mail_express_trn_list.html).我从一个简单的脚本开始:
<?php
require "simple_html_dom.php";
echo file_get_html('http://www.indianrail.gov.in/mail_express_trn_list.html')->plaintext;
?>
Run Code Online (Sandbox Code Playgroud)
它没有显示任何内容,只是一个空白页面,其中包含Apache error.log文件中的错误消息
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
Run Code Online (Sandbox Code Playgroud)
同时所有其他页面(例如:http://www.indianrail.gov.in/special_trn_list.html)使用相同的脚本正常工作.