2011-09-05 113 views
0

我在php(simple_html_dom.php)中使用了簡單的html dom解析器來解析網頁數據並顯示它。 它可以在本地主機[WAMP服務器]精(HTTP://localhost/test/read.php),但是, read.php:域中的HTML DOM解析器問題

<?php 
    include('simple_html_dom.php'); 
    $html = file_get_html('http://www.google.co.in/index.html'); 
    echo $html; 
?> 

我從雅虎小企業的域名(例如網址:www。 mysite.com)

我被這兩個PHP文件放置到這樣我的域路徑, http://www.mysite.com/test/read.phphttp://www.mysite.com/test/simple_html_dom.php

當我運行從我的域read.php,在閱讀這條線就停止了,包括('simple_html_dom.ph P');

請人幫我

感謝, Nandha

+2

什麼是需要allow_url_fopen不工作?什麼是錯誤信息?什麼是'simple_html_dom.php'?你確定你的服務器中有文件/庫嗎? – ajreal

回答

0

確保allow_url_fopen選項啓用,file_get_html()利用了file_get_contents()與HTTP使用時