mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 15:17:16 +01:00
changing the inline delivery method now the 20th time - gosh.
git-svn-id: file:///svn/phpbb/trunk@6626 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
308d2820d9
commit
74a08d9a7b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user