Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
December 4, 2007, 7:02 am
rate this thread
I have this problem, that I need to check the user (using session data
and some checks (included files)), then when ok, I can send a file to
the user.... meaning (simplified):
then, if needed, I might try this (sending a generated file to the
header("Content-Disposition: attachment; filename=\"$filename\"");
But, I cannot set the headers any more. Then again, I need the
$_SESSION information to check this first, and I need some included
functions to do that.
The very ugly solution is all code in one file. There must be another
Any idea how to overcome this?
Re: Headers, session, include, - and header again?
Includes are not the reason you can't send any headers anymore. They fac=
that they produce output is. So, take care of that, strip all output fro=
the included files that shouldn't be there (especially look for whitespa=
outside of php tags if the problem persists). Normally, PHP will inform =
you where the output started.
- » given a package name, how do I find the 'yum' command to install it?
- — Previous thread in » PHP Scripting Forum