"Kubaton Lover" <no****@goawayspam.com> wrote in message news:<vr************@corp.supernews.com>...
"Kubaton Lover" <no****@goawayspam.com> wrote in message
news:vr************@corp.supernews.com...
<snip>
In case anyone else has this problem... the problem is the following line:
header("Content-Disposition: attachment; filename=".$file);
In a previous thread, "R. Rajesh Jeba Anbiah" suggested a website
(http://in2.php.net/header ). That website suggested that I add that line
to fix a "bug" with IE6. I'd have to go back and re-read it to see what it
was trying to fix, but it appears to have caused more problems for me than
corrected.
Did you actually read the usernotes there? Is the following note
caused you the problem actually?
<--------------------------------->
15-Oct-2003 12:27
Some browsers out there on the Internet act funny, especially with
Internet Explorer (IE), so this script will help. This is ony an
example for displaying the PDF. You can REM out the code and change
it to make it be a downloadable file instead.
--snip--
<?
$filename=$_REQUEST['PDF_FileName'];
$filepath=$_REQUEST['PDF_FilePath'];
$filesize=filesize($filepath);
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
header("Content-Type: application/pdf");
header("Content-Length: ".$filesize);
header("Content-Disposition: inline; filename=$filename");
header("Content-Transfer-Encoding: binary");
//Can't use readfile() due to poor controlling of the file
download.
//(IE have this problems)...
//readfile($filepath);
//use fopen() instead of readfile...
$fp = fopen($filepath, 'rb');
$pdf_buffer = fread($fp, $filesize);
fclose ($fp);
//sleep(1);
print $pdf_buffer;
//Required, to keep IE from running into problems
//when opening the file while downloading or downloading...
//(IE been acting strange lately...)
exit();
?>
--snip--
<--------------------------------->
---
"We live to die; we die to live"
Email: rrjanbiah-at-Y!com