Php 在InternetExplorer8中显示或下载Word、PDF文档等?

Php 在InternetExplorer8中显示或下载Word、PDF文档等?,php,http-headers,content-type,content-disposition,Php,Http Headers,Content Type,Content Disposition,我从Oracle BLOB中获取各种文档(PDF、DOCX等),并尝试向用户显示它们,下面是我使用的代码示例: // $p_terms is the document from the Oracle blob // $p_doc_name is the document name // $p_doc_type is the document MIME type while(!$p_terms->eof()){ $var .=$p_terms->read($p_terms-&

我从Oracle BLOB中获取各种文档(PDF、DOCX等),并尝试向用户显示它们,下面是我使用的代码示例:

// $p_terms is the document from the Oracle blob
// $p_doc_name is the document name
// $p_doc_type is the document MIME type

while(!$p_terms->eof()){
    $var .=$p_terms->read($p_terms->size());
}

header('Content-Disposition: inline; filename="'.$p_doc_name.'"');
header('Content-Type: "'.$doc_type.'"');

echo $var;
在Firefox中,我得到以下信息:

在Chrome中,我得到了以下信息:

但在Internet Explorer 8中,什么都不会发生。根本没有下载对话框,它只会显示进度条几秒钟,但会停留在页面上

非常感谢


更新:非常感谢用户1666456建议
内容处置:附件
-这是一个巨大的进步,因为IE实际上试图下载文件,但随后会在Word中生成许多对话框,例如

可能尝试
内容处置:附件
?这是一个伟大的口号,谢谢!不幸的是,虽然我在尝试打开它时出现了这个错误。。。尽管它在点击几个对话框后打开的很好!您使用哪种内容类型?也许可以尝试
应用程序/octet流
。另一个问题