[Xerte] Headers

Patrick Lockley Patrick.Lockley at nottingham.ac.uk
Tue Sep 1 11:00:29 BST 2009


Hi all,

In toolkits, in the download functions (export and scorm), the php code
is thus

header("Content-Length: " . strlen($this->archive));
header("Pragma: public");
header('Content-disposition: attachment; filename="' . $name . '.zip"');
header("Cache-Control: no-cache, must-revalidate, post-check=0,
pre-check=0");
header("Expires: Sat, 01 Jan 2000 12:00:00 GMT");
header("Content-Transfer-Encoding: binary");
print($this->archive);

which is what we release in the zip

however, I've just been tinkering and found that it doesn't work, and I
have to set it to

header("Content-Length: " . strlen($this->archive));
header("Pragma: public");
header('Content-disposition: attachment; filename="' . $name . '.zip"');
//header("Cache-Control: no-cache, must-revalidate, post-check=0,
pre-check=0");
//header("Expires: Sat, 01 Jan 2000 12:00:00 GMT");
header("Content-Transfer-Encoding: binary");
print($this->archive);

to make it work.

Any one understand what this does differently and care to let me know?

Merci

Patrick Lockley
IS Learning Team
King's Meadow Campus
Tel: 0115 84 68882

My Page on Community - http://webapps.nottingham.ac.uk/elgg/cczpl



More information about the Xerte mailing list