-2
您好,我需要创建一个pdf下载线smarty我已经从fpdf,在火虫显示PDF文件,但我可以创建一个下载链接为smarty我的代码如下。如何下载pdf时创建smarty从pdf创建的pdf
$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进阶........
'echo $ content.'什么都没有发生只显示在萤火虫输出'致命错误:在/ var/user/mohan/site/smarty_internal_template中的消息'无法解析资源名称'''的未捕获异常'SmartyException'。 php:941错误显示...... – mohan