Serving PDF Problem
From: Kubaton Lover (nospam_at_goawayspam.com)
Date: 11/11/03
- Next message: ChronoFish: "Re: How can i put the image file to the db ? (mssql)"
- Previous message: Richard Grove: "Re: How can i put the image file to the db ? (mssql)"
- Next in thread: Kubaton Lover: "Re: Serving PDF Problem"
- Reply: Kubaton Lover: "Re: Serving PDF Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Nov 2003 08:12:12 -0600
I'm still having a problem with the following code, but I can better
describe the symptoms now.
Code:
<?php
$uri = getenv('REQUEST_URI');
$pieces = explode('/',$uri);
$file = $pieces[count($pieces)-1];
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=".$file);
readfile('/home/america2/pdfs/'.$file);
?>
The code appears to work perfectly in NN7, but in IE6 it only works when the
user chooses to "Save" the file to the hard drive. If the user chooses to
open the file, Adobe Reader launches, but before a PDF is rendered, the
following error is displayed.
"There was an error opening this document. The file does not exist."
Any suggestions?
- Next message: ChronoFish: "Re: How can i put the image file to the db ? (mssql)"
- Previous message: Richard Grove: "Re: How can i put the image file to the db ? (mssql)"
- Next in thread: Kubaton Lover: "Re: Serving PDF Problem"
- Reply: Kubaton Lover: "Re: Serving PDF Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]