Re: Downloading a file

From: Date: Sat, 03 May 2003 17:44:28 +0000
Subject: Re: Downloading a file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-146296@lists.php.net to get a copy of this message
Thank you for your replies, How would i use the header function in this scenario? Do i redirect to the page with the file link on and include these headers? Thanks for your help. "Dan Rossi" <daniel@electroteque.org> wrote in message news:EJECKPELDLGDPHHJOEDLEELHEMAA.daniel@electroteque.org... > 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 (#146296) next »