|
Posted by jodleren on 12/04/07 07:02
Hi all!
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?
WBR
Sonnich
Navigation:
[Reply to this message]
|