summaryrefslogtreecommitdiff
path: root/download.inc
diff options
context:
space:
mode:
authorprashantsinalkar2016-12-27 15:30:30 +0530
committerprashantsinalkar2016-12-27 15:30:30 +0530
commit634f9d38413ea43b89b37a6e4641070a851120e6 (patch)
treee83103b8fe4e96d5f755a8d656964cec5b1ecdbc /download.inc
parentd4e65f6be3b586e3abaa41a302166809f6ef9d67 (diff)
downloadscilab_textbook_companion-634f9d38413ea43b89b37a6e4641070a851120e6.tar.gz
scilab_textbook_companion-634f9d38413ea43b89b37a6e4641070a851120e6.tar.bz2
scilab_textbook_companion-634f9d38413ea43b89b37a6e4641070a851120e6.zip
added new functions to fix the zip download issues
Diffstat (limited to 'download.inc')
-rwxr-xr-xdownload.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/download.inc b/download.inc
index d33ad1a..f9ed6a1 100755
--- a/download.inc
+++ b/download.inc
@@ -96,6 +96,9 @@ function textbook_companion_download_example()
header('Content-Type: application/zip');
header('Content-disposition: attachment; filename="EX' . $example_data->number . '.zip"');
header('Content-Length: ' . filesize($zip_filename));
+ ob_end_flush();
+ ob_clean();
+ flush();
readfile($zip_filename);
unlink($zip_filename);
} //$zip_file_count > 0
@@ -169,6 +172,9 @@ function textbook_companion_download_chapter()
header('Content-Type: application/zip');
header('Content-disposition: attachment; filename="CH' . $chapter_data->number . '.zip"');
header('Content-Length: ' . filesize($zip_filename));
+ ob_end_flush();
+ ob_clean();
+ flush();
readfile($zip_filename);
unlink($zip_filename);
} //$zip_file_count > 0