1

我的 PHP 应用程序以下代码用于下载文件附件。文件内容和信息作为 blob 数据存储在 MySQL 数据库中。

header('Content-Disposition: attachment; filename="' . $attachment['name']. '"');
header('Content-Type: ' . $attachment['type']);
header('Content-Length: ' .$attachment['size']);
header('Pragma: no-cache');
header('Expires: 0');
print $attachment['content'];
exit;

下载按预期工作,但 1.4 版的 pdf 文件显示空白内容。如果是 pdf 1.3 版,它可以工作。

我怎样才能解决这个问题?

4

0 回答 0