-1

I have a requirement to unzip a file of around 30gb, each day. The zip holds around 500k individual files. What is the best way to do this with php. using the php zip library or exec ?

user1544780
  • 63
  • 1
  • 8
  • 3
    Possible duplicate of [PHP Unzip very large file](https://stackoverflow.com/questions/16877888/php-unzip-very-large-file) – Ramesh Jan 06 '19 at 07:06
  • If your php is running on a linux system, just have a bash script unzip it. – Ibu Jan 06 '19 at 07:58

1 Answers1

1

For complexe tasks that can be perform outside of PHP, it is sometimes better to just let the underlying Operating System do the heavy lifting. Do no reinvent the wheel.

I suggest that you use the system()method to execute a command that is available in the environment for extracting the 30GB file. It could be something like system("unzip name_of_your_file.zip");

asiby
  • 3,229
  • 29
  • 32