I am trying to create a .zip file of a folder in linux.
First I go where the compressed folder is:
shell_exec('cd /var/www/vhosts/website/test/');
The folder test has the folder testzip which should be zipped and sent somewhere else:
shell_exec('zip a -r -tzip /var/www/vhosts/website/zip/save/testzip.zip /var/www/vhosts/website/test/testzip');
This should create testzip.zip
. Somehow this doesn't work.
Could anyone help?