wiseprt Posted November 4, 2016 Share Posted November 4, 2016 (edited) Hello, I have created a custom module that creates a csv from prestashop data. I use the code below: ------ header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=data.csv'); fputcsv($output, array('Column 1', 'Column 2', 'Column 3','Column 4','Column 5','Column 6')); fclose($output); ----- The generated csv including all the data that i want, but the csv also including some extra code that i don't want. I am attaching the csv in order to see yourself what i mean. Any ideas to avoid these extra data included? Thank you datademo.csv.zip Edited November 4, 2016 by wiseprt (see edit history) Link to comment Share on other sites More sharing options...
wiseprt Posted November 7, 2016 Author Share Posted November 7, 2016 Hello, Anyone? Please help... Link to comment Share on other sites More sharing options...
sooly Posted June 15, 2020 Share Posted June 15, 2020 Bump. Have same problem. Any solutiuons? Link to comment Share on other sites More sharing options...
sooly Posted June 15, 2020 Share Posted June 15, 2020 Solution is to add ob_clean(); at begginning of function. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now