|
|
|
@ -133,7 +133,7 @@ class GameMarginController extends AdminController
|
|
|
|
|
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
|
|
|
|
|
|
|
|
|
Vendor("PHPExcel.PHPExcel");
|
|
|
|
|
$objReader = \PHPExcel_IOFactory::createReader('excel2007');
|
|
|
|
|
$objReader = \PHPExcel_IOFactory::createReader('Excel2007');
|
|
|
|
|
//设置模板文件
|
|
|
|
|
$objPHPExcel = $objReader->load("Public/Admin/excel/gamemargin.xlsx");
|
|
|
|
|
$marginInfo = json_decode($info['margin_info'],true);
|
|
|
|
@ -263,7 +263,7 @@ class GameMarginController extends AdminController
|
|
|
|
|
header('pragma:public');
|
|
|
|
|
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="'.$fileName.'".xlsx');
|
|
|
|
|
header("Content-Disposition:attachment;filename={$fileName}.xlsx");//attachment新窗口打印inline本窗口打印
|
|
|
|
|
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'excel2007');
|
|
|
|
|
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
|
|
|
|
|
$objWriter->save('php://output');
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|