ftp数据写入本地
function downfile($fileurl){ $filename=$fileurl; $file = fopen($filename, "rb"); Header( "Content-type: application/html "); Header( "Accept-Ranges: bytes "); Header( "Content-Disposition: attachment; filename= 52qiuxue.html"); $contents = ""; while (!feof($file)) { $contents .= fread($file, 8192); } echo $contents; fclose($file); } $url="http://luntantest.21eedu.com/portal.php"; downfile($url);
posted on 2015-03-10 09:59 Lawson.Zhang 阅读(311) 评论(0) 编辑 收藏 举报