I have written a PHP script for exporting results to the Excel sheet and it works fine in the local machine.
But when i upload my script to the live server it prints the records in an Page (like HTML Output) instead of exporting those results to the excel sheet.I have installed XAMPP server in the live environment.
Please tell me whether I need change any settings in the PHP.ini file or some where else to make export work.
I have used the following headers in my code
header("Content-type: application/vnd.ms-excel; name='excel'");
header("Content-Disposition: attachment; filename=exportfile.xls");
header("Pragma: no-cache");
header("Expires: 0");