Re: How to Return a Real Filename?
| From: | Franklin van Velthuizen | Date: | Thu, 30 Aug 2001 18:47:43 +0000 |
| Subject: | Re: How to Return a Real Filename? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65360@lists.php.net to get a copy of this message | ||
Henrik Hudson wrote:
Morning List- I have a script which gets passed a "fileID" and using that fileID it queries a SQL database and grabs an actual filename and then does a fopen, fpassthru, etc.... I added the header info (application/octet-stream) so it actually downloads the file right away, instead of just displaying the binary content :) Anways, the filename that shows up in the "Save As" box is the script name from the calling HREF. Is there anyway to get around this and have it display the actual filename?header("Content-Disposition: filename=$filename"); / franklin -- Franklin van Velthuizen fv@ebiris.se +46-(0)70-6786613 Ebiris Applications AB http://www.ebiris.se/ +46-(0)19-109917