下载功能<?php
// 输出PDF文件
header('Content-type: application/pdf');// 设定文件名为:downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');// 读取服务器文件。
readfile('original.pdf');
?>
// 输出PDF文件
header('Content-type: application/pdf');// 设定文件名为:downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');// 读取服务器文件。
readfile('original.pdf');
?>
解决方案 »
- php中一些标准的错误提示
- 我确定一定以及肯定的说
- 新手怎样学习PHP
- 刚刚接触PHP,菜鸟,请教环境配置的问题。。。
- PHP如何剪切图片?
- 寻求优化代码
- Warning: session_start() [function.session-start]: Cannot find save handler C:/PHP/Session in E:\TBook\Cms\test.php on line 1
- 使用curl 提交表单(多维数组+文件)数据到服务器的问题
- 请教php在2000下的配置,我用的是iis
- 怎么出错?????
- $rs = mysql_query("select count(*) from guestbook"); 会报错误
- 请问PHP如何让用户选择自已的磁盘目录?
当然,也可以生成一个html,呵呵.
<?php
// 输出PDF文件
header('Content-type: application/pdf');// 设定文件名为:downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');// 读取服务器文件。
readfile('original.pdf');
?>
这个hender里面为什么都要那么写..是什么意思???明天结贴
具体的,lz查一查http协议的相关内容