$strBuffer_Csv = mb_convert_encoding( $strBuffer_Csv,"SJIS","utf-8") ;
$strCsvName = mb_convert_encoding( "loginuser.csv","SJIS","utf-8") ;
//重点部分在?里,上面的代?是?取数据
header('Content-Type: text/x-csv');
header('Content-Disposition: inline; filename="' . $strCsvName . '"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
echo $strBuffer_Csv;//任意ファイル名保存
,其实主要的就是header('Content-Type: text/x-csv');里面的设置,其余的读取数据,输出数据都不是问题