虚拟主机域名注册-常见问题 → 网络编程问题 → PHP | |||||||
php 下载文件 保存文件到本地的方法
function downfile($fileurl,$filename){ ob_start(); $size=readfile($fileurl); header( "Content-type: application/octet-stream "); header( "Accept-Ranges: bytes "); header( "Content-Disposition: attachment; filename= {$filename}"); header( "Accept-Length: " .$size); }
|
|||||||
>> 相关文章 | |||||||
没有相关文章。 | |||||||
发表评论 | |||||||