[thelist] Header Problems with file downloads
The Lists
thelists at antonakis.co.uk
Thu Mar 11 13:23:04 CST 2004
Hi,
I have a button on a form whereby if the use presses it it will (or
should) download the contents of a MYSQL table into a csv file
I seem to be having porblems with the headers...I have the following:
file_put_contents_php4("data.csv", $output);
# creates csv file and outputs it to data.csv
header("Content-type: application/csv;");
header("Content-disposition: attachment; filename=data.csv");
But when I open the csv file it is just the current web page and NOT the
csv file in question...I presume it is the headers which are wrong..any
suggestions please?
TIA
Alexis
More information about the thelist
mailing list