后台导出功能增加内存限制到512M

master
“用lww 5 years ago
parent e1b93a987b
commit f75188f952

@ -5,6 +5,17 @@ use Think\Controller;
class ExportController extends Controller
{
/**
* ExportController constructor.
*/
public function __construct()
{
parent::__construct();
set_time_limit(0);
ini_set('memory_limit', '512M');
}
public function exportExcel($expTitle, $expCellName, $expTableData)
{
$xlsTitle = iconv('utf-8', 'gb2312', $expTitle);//文件名称
@ -38,7 +49,6 @@ class ExportController extends Controller
//导出Excel
function expUser($id)
{
ini_set("memory_limit","256M"); //升级为256M内存
$xlsName = $_REQUEST['xlsname'];
switch ($id) {
case 1:
@ -5563,8 +5573,8 @@ if ($key == 'model'){
function gameFinanceDetail() {
set_time_limit(0);
ini_set('memory_limit', '512M');
// set_time_limit(0);
// ini_set('memory_limit', '512M');
$month = I("game_name");
$xlsName = $month.'充值流水';

Loading…
Cancel
Save