file_get_contents($url)
补充:
$data = file_get_contents('http://www.phpres.com/index.html') ;
//$data是string类型
$dataarray = file('http://www.phpres.com/index.html') ;
//$dataarray 是array类型
本文介绍了如何使用PHP的file_get_contents函数从指定URL获取网页内容。文中提供了两种方式:一种返回字符串类型的网页源码,另一种返回数组类型的网页行集合。
file_get_contents($url)
补充:
$data = file_get_contents('http://www.phpres.com/index.html') ;
//$data是string类型
$dataarray = file('http://www.phpres.com/index.html') ;
//$dataarray 是array类型

被折叠的 条评论
为什么被折叠?