RE: [PHP] Download file name
| From: | Lars Wilhelmsen | Date: | Tue, 25 Jul 2000 15:13:58 +0000 |
| Subject: | RE: [PHP] Download file name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8057@lists.php.net to get a copy of this message | ||
try:
Header( "Content-disposition: Attachment; filename=\"$fname\"\r\n\r\n " );
where $fname is the name of the file.
Regards,
-larsw-
--
Lars Wilhelmsen <lw@ez.no>, developer @ eZ systems <www.ez.no>
-----Original Message-----
From: Benton Jackson [mailto:benton@goatrider.com]
Sent: 25. juli 2000 16:48
To: php-general@lists.php.net
Subject: [PHP] Download file name
Hi,
I'm storing downloadable PDF files in a database. They are retrieved by
linking to a script with "ID=xx" in the URL. For example:
<a href="sample.php?ID=5">click to download sample</a>
The problem I have is, if you right-click on the sample and specify "save
file to disk", the filename defaults to "sample.pdf". How can I force this
filename to be something different and more appropriate (such as
"issue5.pdf" in this instance)?
--
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