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("sessio n_control.php") ;
include('classe s.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=\"$fil ename\"");
readfile($userf ile);
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
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("sessio n_control.php") ;
include('classe s.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=\"$fil ename\"");
readfile($userf ile);
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
Comment