php输出cvs文件,下载cvs文件
时间:2014-08-27 12:32:57
收藏:0
阅读:228
function outputCsv($data, $filename = ‘file.csv‘) {//输出文件,下载文件 header(‘Content-Type:application/force-download‘); header("content-Disposition:filename={$filename}"); foreach ($data as $fields) { foreach ($fields as $key => $value) { echo $value . ‘,‘; } echo "\r\n"; } }
php输出cvs文件,下载cvs文件
原文:http://www.cnblogs.com/chenzhaojx/p/3939018.html
评论(0)