header("Content-type: application/x-octet-stream");

You'll then next be asking about how to make the dialog give the right

header("Content-disposition: filname=whatever.xxx");

Except that only works on some browsers.  On others it's (I think) a
different form of that header.  And *some* browsers are just so broken, the
header doesn't matter, and you need to make the URL have
yourserver.com/yourfile.php/whatever.xxx  no matter how goofy that extra
whatever.xxx part looks.

You may also be asking how to get that pretty progress meter how to look

header("Content-length: yyy");

where yyy is how many bytes you are sending.


This has been asked and answered about every week for the past 4 years...

WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Zhu George-Czz010 <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Thursday, September 13, 2001 5:46 PM
Subject: Forced download??

> Is there a way to do the "forced download"?  i.e., the browser can't read
the file online(no matter whether it is .html or .txt file), instead, when
he clicks the link, he will be asked to download it.
> Is there a way to do that?
> Thanks ahead!

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to