我有关于报告格式的2000名学生的数据,我想导出excel完整数据。为此,我写下了我创建了一个表单的代码,其中存在隐藏字段,在javascript的帮助下包含导出按钮的完整数据。在发布表格之后
function export_data() {
$length = strlen($_REQUEST['export_data']);
header('Content-Type: application/vnd.ms-excel');
$File_Name = 'Exam_Form_Report_'.date('Y-m-d').'.xls';
header('Content-disposition: attachment; filename='.$File_Name);
// Fix for crappy IE bug in download.
header("Pragma: ");
header("Cache-Control: "); header('Content-Length: '.$length);
echo $_REQUEST['export_data'];
exit;
}
调用上面的函数。但是当我点击导出按钮时,我必须面对错误: -
Request Entity Too Large The requested resource /rau/counselling/rauexam/rau/sis_reports/export_data does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
或在离线的情况下,它正常工作。 (我也增加了post_max_limit但问题没有解决。)请任何人都能提供适当的解决方案。