sc_zip_file("File", "Zip")

This macro is used to generate ZIP files from a list of files and/or directories. The file parameter must be one of the following:

- Filename
- Directory name
- A variable containing an array, which contains files and/or directories list.
- A variable a file or a directory name.
- A variable containing an array, which contains files and/or directories list.

The zip parameter must contain the name of the zip file generated or the path to the file.


Ex. 1: Single file compressing.
sc_zip_file("/test/sample.htm", "/tmp/test.zip");


Ex. 2:
Single directory compressing.
sc_zip_file("/test", "/tmp/test.zip");


Ex. 3:
Multiple files and directories in an array.
$prep = array();
$prep[] = "/test/sample.htm";
$prep[] = "/test";
sc_zip_file($prep, "/tmp/test.zip");