Page 1 of 1

Trouble with the output of a csv-file

Posted: Thu Jul 05, 2007 4:15 am
by Stefan Heitmann
Hello,

my problem is in fact that i have an cms like application in php, my template is given out as string via the echo-function. But whenever i just want to give out my csv-file for download there is also a bit of template-code included. This must be because of the fact, that the header function cannot be stoped after the csv-code is given out.

How can i solve this problem?

Grettz

Stefan

Re: Trouble with the output of a csv-file

Posted: Thu Jul 05, 2007 4:39 am
by volka
Stefan Heitmann wrote:This must be because of the fact, that the header function cannot be stoped after the csv-code is given out.
:?:

We probably need to know more about your code.

Posted: Thu Jul 05, 2007 6:10 pm
by Stefan Heitmann
Ok, in fact i just give out the csv-code via echo, using the header method, but the header method is also giving out the source of my page, because the page-source is also included in a var.

One solution which could possibly work is writing the output into another php-file.

Posted: Thu Jul 05, 2007 6:18 pm
by volka
No I'm even more confused. What's the header method and how is it connected to echo?