ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/customer_upload_failed_data.php |
<?php $failure_data =array(); $failure_data=$_POST['failed_data']; $failed_count = $_POST['failed_count']; if($failed_count>0) { $now = gmdate("YmdHis"); header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=Customer_Failed_List_'.$now.'.csv'); $output = fopen("php://output", "w"); fputcsv($output, array('Sno', 'Dp Code', 'Name', 'Mobile', 'Address', 'City', 'State', 'Pincode', 'Destination')); $i=1; foreach ($failure_data as $row) { fputcsv($output, array($i,$row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7])); $i++; } fclose($output); } ?>