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.
提前致謝,
?扎克
總結
以上是生活随笔為你收集整理的ie php文件,IE(HTTPS):从php文件生成pdf不起作用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab能做深度图像的识别吗,Mat
- 下一篇: nginx index.php 端口,n