嗨,我需要在 smarty 中创建一个 pdf 的下载行,我是从 fpdf 制作的,在 fire bug 中显示 pdf 文件,但我可以在 smarty 中创建一个下载链接,我的代码如下。
$content = $this->view->fetch($pdf->Output());
$router->disableRender();
header('Content-Description: File Transfer');
header('Content-Type: application/pdf');
header('Content-disposition: attachment; filename="doc.pdf"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
ob_clean();
flush();
readfile(doc.pdf);
die;
请帮助我 thax adv........