|
@@ -614,6 +614,11 @@ class report {
|
|
|
* export excel
|
|
* export excel
|
|
|
*/
|
|
*/
|
|
|
if ($operate == "excel") {
|
|
if ($operate == "excel") {
|
|
|
|
|
+ $max_ec = ini_get('max_execution_time'); //set max_excution_time
|
|
|
|
|
+ ini_set('max_execution_time', '0');
|
|
|
|
|
+ $memory_limit = ini_get("memory_limit");
|
|
|
|
|
+ ini_set("memory_limit", '2048M');
|
|
|
|
|
+ try {
|
|
|
$sql = common::deCode($_POST['tmp_search'], 'D');
|
|
$sql = common::deCode($_POST['tmp_search'], 'D');
|
|
|
$tmp_mapping = common::deCode($_POST['tmp_mapping'], 'D');
|
|
$tmp_mapping = common::deCode($_POST['tmp_mapping'], 'D');
|
|
|
$mappingConfig = json_decode($tmp_mapping,true);
|
|
$mappingConfig = json_decode($tmp_mapping,true);
|
|
@@ -651,6 +656,15 @@ class report {
|
|
|
$convertedRs[] = $newRow;
|
|
$convertedRs[] = $newRow;
|
|
|
}
|
|
}
|
|
|
common::echo_json_encode(200,array("msg"=>"success","Data" => $convertedRs));
|
|
common::echo_json_encode(200,array("msg"=>"success","Data" => $convertedRs));
|
|
|
|
|
+ } catch (Exception $exc) {
|
|
|
|
|
+ error_log("report datail download:".$exc->getTraceAsString());
|
|
|
|
|
+ //处理异常,标记归位
|
|
|
|
|
+ ini_set('max_execution_time', $max_ec); //recover old value
|
|
|
|
|
+ ini_set("memory_limit", $memory_limit);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ini_set('max_execution_time', $max_ec); //recover old value
|
|
|
|
|
+ ini_set("memory_limit", $memory_limit);
|
|
|
exit;
|
|
exit;
|
|
|
}
|
|
}
|
|
|
|
|
|