1 Attachment(s)
[Resolved] Read file to output in the browser (IE specific)
I'm looking for a method to embed the document in the browser (in IE). I have a
Code:
<?php
require_once(dirname(__FILE__) . '/../../lib/lekoi/helper/WebHelper.php');
$relativePathFilename = 'PFC-1000-6-5546.vsd';
$filename = '/tmxpage/apache/htdocs/changecontrol/' . $relativePathFilename;
$path = pathinfo($filename);
header('Content-Type: ' . get_content_type($path['extension']));
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($filename));
header('Content-Disposition: attachment; filename="' . basename($filename) . '"');
@readfile($filename);
?>
But it'll open the document in another window. I want to show it like this.
Re: Read file to output in the browser (IE specific)
Content-disposition: inline
Re: Read file to output in the browser (IE specific)