Re: ZIP it :o)
| From: | Jim Lucas | Date: | Fri, 01 Jun 2007 05:41:14 +0000 |
| Subject: | Re: ZIP it :o) | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255954@lists.php.net to get a copy of this message | ||
Auto-Deppe, C. Haensel wrote:
Morning guys, I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg.... But that is not the question. I am looking to use exec("zip archive.zip $directory"); $directory has been tried with both full path and relative path ... but that doesn't work. I don't get an error, it just doesn't create the zip-file... So, after a day of Google-ing and trying, I thought I might ask you for help. Cheers for any answers and hints. Regards, ChrisRead up on this page http://us2.php.net/manual/en/function.exec.php Then try this instead <?php exec("zip archive.zip {$directory} 2>&1", $output); echo $output; ?>