【发布时间】:2016-07-24 09:21:28
【问题描述】:
我需要在创建 pdf whit fpdf 后显示一个新页面。我的想法是在 pdf 之前创建页面,将其缓存在浏览器中,创建 pdf,然后刷新缓存并显示页面,但我不知道该怎么做。
<?php $txt = "hallo";
//My page to be cached
header("..........");
// my pdf
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Cell(40,10,"$txt");
$pdf->Output();
// after pdf I want to show page in the cache
?>
非常感谢
【问题讨论】:
-
您的意思是在另一个页面中查看 pdf 吗?
-
不,我需要加载新页面。真正的问题是按下按钮创建 pdf 数据保存在数据库中。如果有人按两次该按钮,我的数据库中有重复记录。如果压后换页没有人可以按两次。