2008-11-19 52 views

回答

9

最簡單的方法是file_get_contents()

$str = file_get_contents('http://myserver/svn/'); 

// Or, if you don't want to hardcode the server 
$str = file_get_contents('http://' . $_SERVER['HTTP_HOST'] . '/svn/'); 

if ($str) 
{ 
    // Find the ul 
} 
1

看一看file_get_contents - 它可以被用來在某些情況下,打開網址,如可以其他一些filesystem functions的:

的URL可以與 此功能作爲文件名如果Fopen包裝 已啓用。關於如何指定 文件名和支持列表 支持URL協議列表的協議/包裝,請參閱 的更多詳細信息,請參閱fopen() 。