Re: filenames on file download

From: Date: Thu, 22 Feb 2001 20:08:12 +0000
Subject: Re: filenames on file download
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41221@lists.php.net to get a copy of this message
no problem :) Header("Content-Type: {$prod_r["file_type"]} "); Header("Content-Disposition: filename='{$prod_r["file_name"]}' "); echo $prod_r["file"]; this code works perfect for me, just modify the variables to meet yours. -- Chris Lee ""indrek siitan"" <tfr@cafe.ee> wrote in message news:BLEPLIMCNIHFBLONKBJCEENIGGAA.tfr@cafe.ee... > Hi, > > I'm storing files in DB. basically (what's important in this case), > I have two columns: > > file_name - contains the original filename > file_src - blob which contains the actual file > > > now the user clicks on a link something like download.php?file_id=123 > and the php script will spit out the file. is there any way (some > header magic) to make the user browser to offer the file to be > saved as "file_name" ? > > > Rgds, > Tfr > > --==< tfr@cafe.ee >==< http://tfr.cafe.ee/ > >==< +372-50-17621 >==-- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#41221) next »