当前位置:Gxlcms > PHP教程 > PHP读取网页文件_PHP教程

PHP读取网页文件_PHP教程

时间:2021-07-01 10:21:17 帮助过:6人阅读

$handle = fopen ("http://www.example.com/", "rb");

$contents = "";

while (!feof($handle)) {

$contents .= fread($handle, 8192);

}

fclose($handle);

?>

$handle = fopen("http://www.example.com/", "rb");

$contents = stream_get_contents($handle);

fclose($handle);

?>

直接上代码了,学技术的,你会懂得

<好东西大家一起吃哦,有好的方法别忘了告诉我一声>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478806.htmlTechArticle?php $handle = fopen ("http://www.example.com/", "rb"); $contents = ""; while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); ? ?php// 对 PHP 5 及更高版...

人气教程排行