提取保存在MySQL数据库中的Blob型PDF

时间:2018-12-30 11:37:02

标签: php

我在数据库mysql类型blob中显示PDF时遇到问题,我得到的结果是

enter image description here

我的代码:

$document = $row['document'];
          header('Content-Type:'.$row['type']) ; 
          header('content-Description:inline;filename:"'. $row['nom_doc'] .'" ');   
          header('content-Transfer-Encoding:binary'); 
          header('Accept-Ranges:bytes');
          echo $document;

当我强制下载pdf时,出现以下错误:Brackets does not support UTF-16 encoded text files.

0 个答案:

没有答案