Yes, the error I get is a pop-up box saying "This is not a valid %PDF file"
Here is my code:
$file_two = 'archive/newsletters/Dec03PostPress.pdf'; //now view the PDF file
header("Content-Type: application/pdf");
header("Accept-Ranges: bytes");
header("Content-Length: ".filesize($file_two));
readfile($file_two);
Now I would think that I wasn't using the correct headers or that the file didn't exist or something of that nature, but since I get no error with the full url, I have more or less figured it was problem with loading a file from the local file system instead of the file itself being corrupt, etc.
Thanks for the help,
Scott Taylor
- Edwin - wrote:
On Tue, 27 Jan 2004 20:22:46 -0500 Scott Taylor <[EMAIL PROTECTED]> wrote:
I understand all of the file size ones. What I really don't understand is why neither of the following examples work:
/* example 1 */ /* where $_SERVER['DOCUMENT_ROOT'] = /usr/local/psa/home/vhosts/domain.com/httpdocs */$file = $_SERVER['DOCUMENT_ROOT'] . '/archive/newsletters/Dec03.pdf'; readfile($file);
/* example 2 */
$file = 'archive/newsletters/Dec03.pdf';
readfile($file);
How does it not work?
Errors, anything?
--
- E - __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php