您好,欢迎访问一九零五行业门户网

PHP 下载 求指点解决办法

php 下载 求指点
这是我在网上荡的一个 成功的下载代码 我已经测试过了。
但是由于手册上面提供的void header ( string string [, bool replace [, int http_response_code]] )
并没有太过于详细的介绍 所以我猜测了一下代码的大体意思
上面的那段header 是否是弹出 下载提示框的 信息? 希望有高手能给点详细的
------解决方案--------------------
下载只要有主要几项就可以:
php code$file = 'asdfggg.pdf';_download(files_dir/.$file, $file);function _download($f_location,$f_name){ header('content-type: application/octet-stream'); header('content-length: ' . filesize($f_location)); header('content-disposition: attachment; filename=' . basename($f_name)); readfile($f_location); }

其它类似信息

推荐信息