什么是保存FPDF到数据库的最好方法?(what is the best way the save

2019-10-29 06:07发布

我在PHP新的,我想保存PDF到数据库中,我想知道是什么拯救FPDF到数据库的最好方法? 我使用的是BLOB类型只是为了节省PDF的内容,但我想要得到的PDF文件读入表,看到的内容当我点击该文件。

我的代码来获取内容是:

$query = "select nomeUser,email,nomeVoucher,categoria,preco,confirmacao,filePDF
from historico
LIMIT $start, $per_page";
while ($stmt->fetch()) {

        if($confirmacao == "a confirmar"){
        echo("<tbody >");           
        echo("<tr><td>$nomeUser</td>");
        echo "<td>$email</td>";
        echo("<td >$nomeVoucher</td>");
        echo("<td >$categoria</td>");
        echo("<td>$preco €</td>");
        echo("<td>$confirmacao</td>");

filePDF是名称,其中保存我FPDF的内容我怎样才能做到这一点?

文章来源: what is the best way the save fpdf into database?
标签: php html mysqli