mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
#18675748 10MB 이상의 대용량 파일은 fpassthru 대신 fread를 사용하도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8111 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9e39a22f16
commit
b230d45a71
1 changed files with 7 additions and 1 deletions
|
|
@ -230,7 +230,13 @@
|
|||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header("Content-Transfer-Encoding: binary\n");
|
||||
|
||||
fpassthru($fp);
|
||||
// if file size is lager than 10MB, use fread function (#18675748)
|
||||
if (filesize($uploaded_filename) > pow(1024, 10240)) {
|
||||
while(!feof($fp)) echo fread($fp, 1024);
|
||||
fclose($fp);
|
||||
} else {
|
||||
fpassthru($fp);
|
||||
}
|
||||
|
||||
// 이상이 없으면 download_count 증가
|
||||
$args->file_srl = $file_srl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue