Home  >  Article  >  Backend Development  >  PHP怎样实现用户点击下载跳出下载页面

PHP怎样实现用户点击下载跳出下载页面

WBOY
WBOYOriginal
2016-06-23 14:05:49997browse

PHP怎样实现用户点击下载跳出下载页面??[img=http://][/img]例如这个点击下载!可以实现下载图片的功能


回复讨论(解决方案)

header头下载


	header("Content-Type:text/csv");		header("Content-Disposition:attachment;filename=$file");		readfile("$filename");

$file 是文件名 $filename 是文件目录 
header("Content-Type:text/csv"); 这个格式依需要而定

header功能是干嘛的呢

header功能

同2楼!!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn