force binary files to open
| From: | Michael Watts | Date: | Wed, 07 Aug 2002 02:37:55 +0000 |
| Subject: | force binary files to open | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111464@lists.php.net to get a copy of this message | ||
Hi,
I have a pdf file that I would like to force to open in a browser, but
cant seem to work out how exactly to script it. I attempted this
<?php
$type='application/pdf';
$file='http://intranet.wesfarmers.com.au/forms/wfteldir.pdf';
Header("Content-type: $type");
echo($file);
?>
but the only output I got was a plain text page with the $file variable
on it
http://intranet.wesfarmers.com.au/forms/wfteldir.pdf
This is probably pretty obvious to anyone who knows anything about php.
I have tried the php pdf_open and pdf_open_image functions but I need to
open an exisiting pdf file, the pdf functions seem to be there to
generate a pdf file, then open it.
Does anyone know how to force the pdf file to open?
Thanks
Mike W
This email is confidential and may contain legally privileged information.
If you are not the intended recipient, you must not disclose or use
the information contained in it. If you have received this email in error,
please notify us immediately by return email and delete the document.