I've recently been given a task that involves uploading a zip file, storing it in a database as a blog, and then extracting and presenting the contents of that zip file when the client requests it.
I've got two approaches for this task: Using the exec
command to execute the zip
command native to the Linux OS the web server is running on, or using the ZipArchive class that comes with PHP.
- Which approach uses the least amount of memory?
- Which approach offers the most flexibility? W
- What are the major advantages of one approach over the other?