X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/b6f423726c6f71c769fc7d7f3b842f623595a808..8eaac5f4c305c363310494c4625962531906d947:/f.php diff --git a/f.php b/f.php index ed7d782..5555523 100644 --- a/f.php +++ b/f.php @@ -89,8 +89,8 @@ if (!empty($delete_code) && $delete_code == $link['link_code']) { '
'; } else { ?>' . t('GIMME_PSW') . ' : ' . - '' . + '' . ' |
' . t('USING_SERVICE'). ' ' . t('TOS') . '.' . @@ -272,11 +270,16 @@ elseif ($link['crypted']) { } /* Read file. */ else { - $r = fopen(VAR_FILES . $p . $link['hash'], 'r'); - while (!feof($r)) { - print fread($r, 1024); + if ($cfg['use_xsendfile']) { + $file_web_path = preg_replace('#^' . $_SERVER['DOCUMENT_ROOT'] . '#', '', VAR_FILES); + header('X-Sendfile: ' . $file_web_path . $p . $link['hash']); + } else { + $r = fopen(VAR_FILES . $p . $link['hash'], 'r'); + while (!feof($r)) { + print fread($r, 1024); + } + fclose($r); } - fclose($r); } if ($link['onetime'] == 'O') { |