![]() |
CSV File download not working on live server though it works on localhost
I am facing a problem with the CSV download on live though it's working on localhost.
Here is my code, please have a look - function event_signup_download_detail($nid) { module_load_include('inc', 'signup_event', 'event_signup_view'); $csv_output = ''; $csv_output .= "Role,Last name,First Name,Patrol,Position,Home phone,Cell Phone,Email,Payment Date,Unit Join Date,Payment Status\n"; $nid = 2001; // add the paid users to the csv $csv_output .= getPaidScoutUsers($nid); // get unpaid users, add them to the csv $csv_output .= getUnpaidUsers($nid); header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"Registration_Dues_Information.csv\""); header("Pragma: no-cache"); header("Expires: 0"); print $csv_output; exit(0); } Can somebody point out the issue? I have mentioned AddType application/octet-stream .csv in my .htaccess also, so that wont be the issue I hope.. Thanks |
Check your error logs or enable it inline with
PHP Code:
|
| All times are GMT +1. The time now is 09:12 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.