Downloading Images
| From: | Roger Bryant | Date: | Thu, 04 Oct 2001 14:32:17 +0000 |
| Subject: | Downloading Images | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-69925@lists.php.net to get a copy of this message | ||
All,
I have searched high and low through the lists to find
a solution to this problem but none of the suggestions
appear to work for me.
I have added a download button to a web-site that
enables users to download images to their local
drives. (I'm using a button as I want to wrap some
logic round this function) I have the following
(simplified code )that will be called from the
web-site when the button is clicked.
header("Content-type: application/octet-stream");
header( "Content-Disposition: attachment;
filename=01lg.jpg");
$filename= "c:/program files/apache
group/apache/kidz/gallery/download/01lg.jpg";
include($filename);
The result is the SaveAs box appears and the image is
being downloaded with the correct name however when I
try and re-open the image i get the message invalid
header. Does anyone have any ideas?
Vesrions are PHP 3,IE6, Windows ME.
Thanks very much in advance,
Roger
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1