Revert "Fixed allowed memory size exhausted error"
This reverts commit 1230186977
.
This commit is contained in:
parent
1230186977
commit
3cb3c8e234
|
@ -4,26 +4,21 @@
|
|||
@if (file_exists(base_path('backups/updater-backups/')) and is_dir(base_path('backups/updater-backups/')))
|
||||
<?php
|
||||
$filename = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$filepath = base_path('backups/updater-backups/') . $filename;
|
||||
|
||||
if (file_exists($filepath)) {
|
||||
header("Content-type: application/octet-stream");
|
||||
header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
$strFile = file_get_contents($filepath);
|
||||
|
||||
$file = fopen($filepath, 'rb');
|
||||
if ($file) {
|
||||
while (!feof($file)) {
|
||||
echo fread($file, 8192);
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
fclose($file);
|
||||
header("Content-type: application/force-download");
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
echo $strFile;
|
||||
while (ob_get_level()) {
|
||||
ob_end_clean();
|
||||
}
|
||||
readfile($filepath);
|
||||
exit;
|
||||
} else {
|
||||
echo 'File not found.';
|
||||
}
|
||||
?>
|
||||
@endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue