RE: [PHP] Downloading a file

From: Date: Sat, 03 May 2003 13:43:10 +0000
Subject: RE: [PHP] Downloading a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146260@lists.php.net to get a copy of this message
Header('Content-Type: application/octet-stream'); Header('Content-disposition: attachment; filename='.$filename); -----Original Message----- From: Daniel R. Anderson [mailto:dan@mathjunkies.com] Sent: Saturday, May 03, 2003 10:17 PM To: shaun Cc: php-general@lists.php.net Subject: Re: [PHP] Downloading a file I forget the exact specifications off my head, but you can write a PHP script to send out a header that basically says download this file and save as _____. Check out header() for more info (The type to just download is octel/stream i /think/) -Dan Anderson On Sat, 2003-05-03 at 07:52, shaun wrote: > Hi, > > I have the following link on my page: > > <p>click <a href="/files/test.txt">here</a> to view the > document</p> > > When I click on this link it opens the file in the same window, how can I > make sure that the link opens a dialog box asking me if I want to download > the file? > > Thanks for your help > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#146260) next »