|
Posted by AnrDaemon on 12/05/07 15:47
Greetings, jodleren.
In reply to Your message dated Tuesday, December 4, 2007, 10:02:57,
> 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):
> header("Pragma: no-cache");
> header("Expires: -1");
> session_start();
> if($_SERVER['QUERY_STRING']=="logout")
> session_unset();
> include("session_control.php");
> include('classes.php');
> then, if needed, I might try this (sending a generated file to the
> user):
> header('Content-type: application/octet-stream');
> header("Content-Disposition: attachment; filename=\"$filename\"");
> readfile($userfile);
> 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
> way....
> Any idea how to overcome this?
One more idea - enable output buffering.
--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>
[Back to original message]
|