cruel
Programmer
- Aug 6, 2001
- 131
I looked through FAQ and could not find anything, though the internet has lot of discussion about it.
Somone suggested the following, nice of it is it will pop out something and ask you where and what to save it to:
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=$filename.csv");
header("Pragma: no-cache");
header("Expires: 0");
but I never could save the carriage return, in fact, the comma does not even come out right. It is lumped in one cell.
So I use fwrite. I need to design my own pop out thing though. However, what in html would allow me to let user choose a folder (it has a browse for file function in <input type="file"...>, but nothing about a folder).
what to suggest?
Somone suggested the following, nice of it is it will pop out something and ask you where and what to save it to:
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=$filename.csv");
header("Pragma: no-cache");
header("Expires: 0");
but I never could save the carriage return, in fact, the comma does not even come out right. It is lumped in one cell.
So I use fwrite. I need to design my own pop out thing though. However, what in html would allow me to let user choose a folder (it has a browse for file function in <input type="file"...>, but nothing about a folder).
what to suggest?