01 $csvContent = "qwe,qwe,qwe,qwe,qwe,qwe,qwe \ n";
The header ("Content-type:application/vnd.ms-excel; charset=gb2312 ");
The header ("Pragma:public");
The header ("expires:0");
Header ("Cache-control:must-revalidate, Post-check=0, pre-check=0");
The header ("Content-type:application/force-download");
Header ("Content-type:application/octet-stream");
The header ("Content-type:application/download");
Header ("Content-disposition:attachment;filename=csv data. csv");
Header ("Content-transfer-encoding:binary");
$csvContent = Iconv ("Utf-8", "gb2312", $csvContent);
Echo $csvContent;
+ exit;
?>
Author: Plastic Sheets
http://www.bkjia.com/PHPjc/478127.html www.bkjia.com true http://www.bkjia.com/PHPjc/478127.html techarticle 01?php 02$csvcontent = qwe,qwe,qwe,qwe,qwe,qwe,qwe \ n; 03header (content-type:application/vnd.ms-excel; charset= GB2312); 04header (Pragma:public); 05header (expires:0); 06header (Ca ...