note 38695 deleted from ref.exec by nlopess
| From: | nlopess@php.net | Date: | Sat, 03 Jan 2004 10:07:29 +0000 |
| Subject: | note 38695 deleted from ref.exec by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62845@lists.php.net to get a copy of this message | ||
Note Submitter: amarullahthea@yahoo.com
----
You Cannot make a zip file with ZIP Function, but with Execution you can do it. This Function will
make a Zip file on current directory (on Linux)
<?php
function MakeZipFile($ZipFileName,$FileSelected);
{
system("zip -9 -u -q -r $ZipFileName,$FileSelected");
}
// create test.zip --> all file include directories and dir-content
MakeZipFile("test.zip","*");
//create test2.zip in other directory --> all php files
MakeZipFile("/tmp/test2.zip","*.php");
?>