我需要使用簡單的HTML DOM來廢棄一個大的HTML文件(例如: - http://www.indianrail.gov.in/mail_express_trn_list.html)。我開始用一個簡單的腳本..簡單的HTML DOM廢除大型HTML文件
<?php
require "simple_html_dom.php";
echo file_get_html('http://www.indianrail.gov.in/mail_express_trn_list.html')->plaintext;
?>
這表明了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
沒什麼,只是與該錯誤消息的空白頁,同時所有其他頁面(例如: - http://www.indianrail.gov.in/special_trn_list.html)使用相同的腳本正常工作。 需要幫助
在此先感謝。
您是否嘗試過使用'file_get_contents'而不是'file_get_html'? http://php.net/manual/en/function.file-get-contents.php –
我能夠複製的問題,我會深入挖掘,讓你知道 – DevZer0
@Fred我試過了,但同樣的錯誤.. – krizna