简体   繁体   中英

PHP : Corrupt ZIP when download large multiple files

I got an error when I download large multiple files like 5 videos

Here is the code :

HTML5 code :

<input type='checkbox' name='files[]' value="<?php echo $row['video_name']; ?>">

PHP code :

header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');readfile($zip_name);
unlink($zip_name);

Without knowing what the error is, I'll take a stab in the dark:

ini_set("max_execution_time", 300);

My guess is your script is timing out. Hard to say without more data tho.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM