Damn php output buffering.
In category Site on 27 Jan 2006 @ 05:22 am
I want to send a file. The code to send it is run by the template. To begin with I start the output buffer at the very beginning of my code,
No matter what, as soon as ob_clean() or ob_end_clean() is called, all I get after that is a totally blank page. Suggestions anyone?
Maz
ob_start("ob_gzhandler"); // start the ob
// load the template here.
// get the request to send the file
ob_clean(); // should totally wipe the buffer
// send the file
exit();
// load the template here.
// get the request to send the file
ob_clean(); // should totally wipe the buffer
// send the file
exit();
No matter what, as soon as ob_clean() or ob_end_clean() is called, all I get after that is a totally blank page. Suggestions anyone?
Maz
Ok. The problem was ob_start("ob_gzhandler");
Apparently if you use the gzip callback function, when you call ob_clear() it just shits itself or something.
Stuffed if I know what's going on with it.
# Comment by Maz on 01 Feb 2006 @ 05:43 am
Apparently if you use the gzip callback function, when you call ob_clear() it just shits itself or something.
Stuffed if I know what's going on with it.
# Comment by Maz on 01 Feb 2006 @ 05:43 am




I think we need more lines to see exactly what it's doing.
Cheers matey.
# Comment by Kipps on 28 Jan 2006 @ 11:21 pm
http://www.exiledmind.net