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 では何も起こりません。ダウンロード ダイアログはまったく表示されず、プログレス バーが数秒間表示されるだけで、ページにとどまります。
どうもありがとう
更新:提案してくれた user1666456 に感謝しますContent-Disposition: attachment
- IE が実際にファイルをダウンロードしようとするため、これは大きな進歩ですが、Word で多数のダイアログ ボックスが生成されます。たとえばhttp://i.imgur.com/jx7wjjM.png