PHP获得网页内容

$contents=file("http://www.baidu.com");返回的是一个数组

$contents=file_get_contents("http://www.baidu.com");返回一个字符串

readfile("http://www.baidu.com");直接打开网页.

 

posted @ 2014-03-19 16:57  寂夜冷风  阅读(160)  评论(0编辑  收藏  举报