ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/excel/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/excel/error_pickup_entry.php |
<?php $errData=array(); $errData=$_REQUEST; // print_r($errData); $now = gmdate("YmdHis"); header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=Error_Pickup_Entry_list.csv'); $output = fopen("php://output", "w"); fputcsv($output, array('Customer Type (Regular-1/One time-2) (Required)','DB Code (Required)','AWB No (Required)','Customer Name ','Address (Characters should less than 110)','City (Required)','State (Required)','Destination City (Required)','Pincode(Required)','Phone Number (Required)','Pickup Entry Date(dd-mm-yyyy) (Required)','Actual Weight','Charged Weight','Number of Pieces','Content Description','Reason')); $k=count($errData['dbCode']); for($i=0;$i<$k;$i++) { fputcsv($output, array($errData['cust_type'][$i],$errData['dbCode'][$i],$errData['awbno'][$i],$errData['cust_name'][$i],$errData['cust_address'][$i],$errData['cust_city'][$i],$errData['cust_state'][$i],$errData['cust_destination'][$i],$errData['cust_pincode'][$i],$errData['cust_phone'][$i],$errData['cust_pickupDate'][$i],$errData['cust_aWeight'][$i],$errData['cust_cWeight'][$i],$errData['cust_nop'][$i],$errData['cust_content'][$i],$errData['reason'][$i])); } fclose($output); ?>