Forum Moderators: coopster
I have
$size = filesize($PHP_SELF);
header("Content-length: $size");
which is obviously incorrect.
I've seen something to the effect it needs an absolute filename rather than a URI but can't find how this is done, which surprised me as I would have expected this is used quite often.
[uk.php.net...]
You need to:
1/ Turn output buffering ON at the top of your script with ob_start()
2/ ... rest of script ...
3/ use header("Content-length: ".ob_get_length()) at the end of your script.