PHPExcel导出文件到文件夹

PHPExcel
@Version 1.8.0

//文件存储路径
$filePath = './Uploads/';
//清除缓存
ob_end_clean();

//文件名称
$outputFileName = 'ABC'.'.xls';

//中文乱码
$filename = iconv("utf-8","gb2312",$outputFileName);
$xlsWriter = new \PHPExcel_Writer_Excel5($PHPExcel);

//保存文件
$xlsWriter->save($filePath."$filename");
仅有 1 条评论
  1. 花生

    很不错哟

    花生 September 14th, 2018 at 05:43 pm回复
发表新评论