So you have tried as per the manual: header("Content-Disposition: attachment; filename=downloaded.pdf");
I use this all the time without issue.. do you have a shell that you can use to "wget -S" and see if the correct headers are coming out?? Timothy Hitchens (HiTCHO) Open Platform Consulting e-mail: [EMAIL PROTECTED] > -----Original Message----- > From: Lars Olsson [mailto:[EMAIL PROTECTED]] > Sent: Monday, 13 January 2003 11:05 PM > To: [EMAIL PROTECTED] > Subject: [PHP] attachment problem > > > Hi all! > > I'm writing a webmail application in PHP and most basic things are > working now. However, I've recently run into a problem > concerning mail > attachments. This is the situation right now: > > When the user opens a letter there are links to all attachments. The > links looks like this: > http://www.lassoweb.nu/webmail/attachment.php/mailbox=INBOX&ms guid=218&part=2 Mailbox is the mailbox name, msguid is the message number and part corresponds to the part of the letter that is an attachment. When the user clicks the link the attachment data is extracted from the message and displayed in the browser (if possible). This works nice, but here comes the problem. Since the document is named 'attachment.php', that's the name that comes up in the save box whenever the user tries to save the file. Iv'e tried setting the Content-Disposition header to tell the browser what to call the attachment, but to no avail. The browser still insists on calling all attachments 'attachment.php'! I've been trying to figure this out for a couple of days now, but no luck yet. Perhaps someone out there have had the same problem (and solved it)? I'm thankful for any hints /Lars 'lasso' Olsson ([EMAIL PROTECTED]) PS. One solution might be to 'trick' the browser by creating a fake URL (like http://www.lassoweb.nu/webmail/void/bob.gif), but in order for this to work I need to tell Apache to send all requests to the 'void' directory to a single PHP file. Anyone knows how to set this up? DS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php