note 87094 deleted from function.header by philip
| From: | philip@php.net | Date: | Sun, 30 Nov 2008 16:52:41 +0000 |
| Subject: | note 87094 deleted from function.header by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-147437@lists.php.net to get a copy of this message | ||
Note Submitter: sohel62 at yahoo dot com
----
For CSV download program try with this.
Support IE and other common browsers under SSL and Non SSL environment.
<?php
/**
* Title: CSV download method.
*
* @author Taslim Mazumder Sohel
* @deprecated 1.0 - 2008/11/19
*
* Note: Work perfect under SSL and Non SSL for IE and other common browsers.
* Also support multi byte CSV file name.
*/
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header('Content-Type: application/html; charset=Windows-31J'.'\r\n');
header('Content-Disposition: attachment;
filename="'.mb_convert_encoding("ãã¹ãFileName",
"Windows-31J",
"auto")."_".date("Ymd").'.csv"');
header("Content-Transfer-Encoding: binary");
echo "\"AAA\",\"BBBBB\",\"CCCCCCCC\"\n";
echo "\"A11\",\"BBB11\",\"CCCCCC11\"";
?>