ie php文件,IE(HTTPS):从php文件生成pdf不起作用

这是我的问题.我试图调用一个页面:foo.php?docID = bar并将PDF返回到在DB中作为BLOB存储的屏幕.

这是我的代码实际返回PDF的部分:

$docID = isset($_REQUEST['docID']) ? $_REQUEST['docID'] : null;

if ($docID == null){

die("Document ID was not given.");

}

$results = getDocumentResults($docID);

if (verifyUser($user, $results['ProductId'])){

header('Content-type: application/pdf');

// this is the BLOB data from the results.

print $results[1];

}

else{

die('You are not allowed to view this document.');

}

这在Firefox中工作得很好.

但是,在IE中,它根本不显示任何东西.如果我在另一个网页(即google.com)上,并输入网址即可进入此页面,它会说明已经完成,但我仍然会在我的屏幕上显示google.com.

我检查了来自firefox和IE的响应的标题.他们是一样的

有没有人有什么建议?需要更多信息?

编辑:如果它有帮助,这里是响应标题和内容的第一行:

HTTP/1.1 200 OK

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Content-Length: 349930

Content-Type: application/pdf

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Server: Microsoft-IIS/6.0

X-Powered-By: PHP/5.1.2

Set-Cookie: PHPSESSID=cql3n3oc13crv3r46h2q04dvq4; path=/; domain=.example.com

Content-Disposition: inline; filename='downloadedFile.pdf'

X-Powered-By: ASP.NET

Date: Tue, 21 Apr 2009 16:35:59 GMT

%PDF-1.4

编辑:此外,拉出pdf文件的页面实际上使用HTTPS而不是HTTP.

提前致谢,

〜扎克

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值