IE likes excel files, and wants to open them for you since it is such a
"helpful" application...

If you want to force the download you need to lie to the browser and claim
you are passing a file that it won't know what to do with.

You can try an exe header, but that will likely prompt security warnings
that will bug your users.

Stephen Johnson c | eh
The Lone Coder
continuing the struggle against bad code

> From: Hiep Nguyen <[EMAIL PROTECTED]>
> Date: Mon, 17 Dec 2007 15:13:45 -0500
> To: <>
> Subject: [PHP-DB] force to download file
> hi all,
> i have this on top of my php page:
> header("Content-Type: application/");
> header("Content-Disposition: inline; filename=excelfile.xls");
> but it is not prompt to save the file instead it opens right in IE.
> my question is how do i force the browser prompts to save the file?
> thanks

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to