请问用什么方法可以在安装了AcrobarReader情况下来下载PDF文件呢?

lwhdahong 2004-04-13 02:58:05
好像是在另一个页面里设置它的Header来下载的,但又怎样下载了就关闭打开的那个浏览器呢? 很急!!
...全文
102 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jah1919 2004-04-15
  • 打赏
  • 举报
回复
http://www.fpdf.org/
这里很多例子,有源代码
unixdotnet 2004-04-15
  • 打赏
  • 举报
回复
如果客户端浏览器是IE的话:

header( 'Content-Disposition: inline; filename="' . $file_name . '"' );
header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
header( 'Pragma: public' );
readfile( 文件名 );

如果是其它浏览器的话:

header( 'Content-Disposition: attachment; filename="' . $file_name . '"' );
header( 'Pragma: no-cache' );
readfile( 文件名 );

21,893

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧