download filename issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yeller
Forum Newbie
Posts: 2
Joined: Tue Jan 23, 2007 10:36 am

download filename issue

Post by yeller »

Is there any way to change the name of the file as presented in the download window that appears when downloading a file? The filename by default is not optimal.

thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://de3.php.net/manual/en/function.header.php wrote:// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
see also http://www.w3.org/Protocols/rfc2616/rfc ... #sec19.5.1
Post Reply