[PHP-DB] Re: [PHP] Re: [PHP-DB] force to download file

2007-12-18 Thread Richard Heyes
i have this on top of my php page: header("Content-Type: application/vnd.ms-excel"); 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? That sh

RE: [PHP-DB] force to download file

2007-12-17 Thread Lasitha Alawatta
Hi , Try with this header. $export_file = "YourFileName.xls"; ob_end_clean(); ini_set('zlib.output_compression','Off'); header('Pragma: public'); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header('Last-Modif

Re: [PHP-DB] force to download file

2007-12-17 Thread Daniel Brown
On Dec 17, 2007 3:13 PM, Hiep Nguyen <[EMAIL PROTECTED]> wrote: > hi all, > > i have this on top of my php page: > > header("Content-Type: application/vnd.ms-excel"); > header("Content-Disposition: inline; filename=excelfile.xls"); > > but it is not prompt to save the file instead it opens right in

Re: [PHP-DB] force to download file

2007-12-17 Thread Stephen Johnson
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 wa