EC-CUBEの帳票出力機能はIE6に対応していない

EC-CUBE2.4系以前の話になります(2.11系は対応出来てるのか試していません)

これってだいぶ前から既知のバグだと思っていたんですが
EC-CUBEメインの会社でもまったく知られてなかったのでメモ書き程度に残しておきます

data/pdf/fpdf.phpを修正します

~~~
Error(‘Some data has already been output, can\’t send PDF file’);
if(php_sapi_name()!=’cli’)
{
//We send to a browser
header(‘Content-Type: application/pdf’);
if(headers_sent())
$this->Error(‘Some data has already been output to browser, can\’t send PDF file’);
header(‘Cache-Control: ‘);
header(‘Pragma: ‘);
header(‘Content-Length: ‘.strlen($this->buffer));
header(‘Content-disposition: inline; filename=”‘.$name.'”‘);
}
echo $this->buffer;
break;
case ‘D’:
//Download file
if(ob_get_contents())
$this->Error(‘Some data has already been output, can\’t send PDF file’);
if(isset($_SERVER[‘HTTP_USER_AGENT’]) && strpos($_SERVER[‘HTTP_USER_AGENT’],’MSIE’))
header(‘Content-Type: application/force-download’);
else
header(‘Content-Type: application/octet-stream’);
if(headers_sent())
$this->Error(‘Some data has already been output to browser, can\’t send PDF file’);
header(‘Cache-Control: ‘);
header(‘Pragma: ‘);
header(‘Content-Length: ‘.strlen($this->buffer));
header(‘Content-disposition: attachment; filename=”‘.$name.'”‘);
echo $this->buffer;
break;
case ‘F’:
//Save to local file
~~~

EC-CUBE 開発コミュニティサイト – フォーラム

ちなみに
EC-CUBE開発Wiki – [EC-CUBE]IE6で帳票(PDF)が開けない
Monolog: [EC-CUBE] IE6でPDFファイルが開けない謎

これは効果がなかったです。
なんか環境とか、バージョンとかあるのかな?

コメント

タイトルとURLをコピーしました