【发布时间】:2013-12-03 12:35:47
【问题描述】:
当用户单击链接时,我真的很难让我的应用程序打开 pdf。
到目前为止,锚标记重定向到发送标题的页面:
$filename='./pdf/jobs/pdffile.pdf;
$url_download = BASE_URL . RELATIVE_PATH . $filename;
header("Content-type:application/pdf");
header("Content-Disposition:inline;filename='$filename");
readfile("downloaded.pdf");
这似乎不起作用,过去有没有人成功解决过这个问题?
【问题讨论】:
-
错字?尝试添加
'$filename='./pdf/jobs/pdffile.pdf';并在此行中添加header("Content-Disposition:inline;filename='$filename");缺少引号。 -
您如何/为什么使用
$url_download?