PHP Unzip very large file

浪尽此生 提交于 2019-12-05 18:11:05

For a pure PHP solution, try PclZip - this would not require you to install any PHP extensions or require shell access - you just need to write access to wherever you want to extract the files.

$filename = '/media/file.gz';

$unzipped_content = '';   
$zd = gzopen($filename, "r");
while ($zip_file = gzread($zd, 10000000)){
    $unzipped_content.= $zip_file;
}
gzclose($zd);

echo $unzipped_content;
Ozzy

Thanks for the suggestions everyone. I ended up modifying the code in this question to unzip the files.

Unzip a file with php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!