diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 15:08:18 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 15:08:18 +0000 |
commit | 74a08d9a7ba0a659c49a44a41b7455a86342eaf9 (patch) | |
tree | 318e3858e507510888776ae6bde85f9c035ce5a5 /phpBB/download.php | |
parent | 308d2820d91aef84ed9357e8b4e2902b66644a33 (diff) | |
download | forums-74a08d9a7ba0a659c49a44a41b7455a86342eaf9.tar forums-74a08d9a7ba0a659c49a44a41b7455a86342eaf9.tar.gz forums-74a08d9a7ba0a659c49a44a41b7455a86342eaf9.tar.bz2 forums-74a08d9a7ba0a659c49a44a41b7455a86342eaf9.tar.xz forums-74a08d9a7ba0a659c49a44a41b7455a86342eaf9.zip |
changing the inline delivery method now the 20th time - gosh.
git-svn-id: file:///svn/phpbb/trunk@6626 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/download.php')
-rw-r--r-- | phpBB/download.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/phpBB/download.php b/phpBB/download.php index 64d147fa79..d3f600abdb 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -245,8 +245,19 @@ function send_file_to_browser($attachment, $upload_dir, $category) header("Content-Length: $size"); } - // Might not be ideal to store the contents, but file_get_contents is binary-safe as well as the recommended method - echo @file_get_contents($filename); + // Try to deliver in chunks + @set_time_limit(0); + + $fp = @fopen($filename, 'rb'); + + if ($fp !== false) + { + while (!feof($fp)) + { + echo fgets($fp, 8192); + } + fclose($fp); + } flush(); exit; |