1. There are many kinds of export, he has the export of the package, but if you want to export 7, 8,000 of the data is a bit difficult, I recently found an export can go to 10,000 of the data, as if only exported in CSV format.
Public Function Down_load ($lists) {
Set_time_limit (0);
Ini_set (' Memory_limit ', ' 1024M ');
$arr = Array (' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' g ', ' h ', ' I ', ' j ', ' K ', ' l ', ' m ', ' n ');
$data = ' serial number ';
foreach ($arr as $_arr) {
$data. = ', '. $_arr;
}
$data. = "\ n";
$i = 0;
foreach ($lists as $key = $_list) {
$i + +;
$data. = $i. ', '. $_list[' account '][0][' business_department ']
. ', '. $_list[' account '][0][' capital_platform ']. ", '. $_list[' account '][0][' account ']. ', '. $_list[' Currency_type ']. ' , '. $_list[' begin_y ']. ', '
. $_list[' Begin_b ']. ', '. $_list[' debit_y ']. ', '. $_list[' Debit_b ']. ', '. $_list[' credit_y ']. ', '
. $_list[' Credit_b ']. ', '. $_list[' end_y ']. ', '. $_list[' end_b ']. ', '. $_list[' year ']. ', '. ' ".", "." ".", "." \ n ";
}
Ob_end_flush ();
Header ("Content-type:text/csv");
Header ("Content-disposition:attachment;filename= Order Detail report. csv"); "Generate file name" = Custom
Header (' cache-control:must-revalidate,post-check=0,pre-check=0 ');
Header (' expires:0 ');
Header (' Pragma:public ');
Echo $data;
Exit
}
PHP Export CSV