firstly, I am not the correct stackExchange site to post this question, if the question is for another stack site, please delete my question.
Now let's talk about the question: In this situation, there is a file that is located in: /home/user/public_html/folder-one/folder-two/folder-three/file.php , and the file should create the archive of the /folder-one with all files and subfolders of /folder-one . I am creating an archive with a system function (exec (), shell_exec () or system ()) and it works fine. My code is:
<?php $output = 'zip -rq my-zip.zip /home/user/public_html/folder-one -x missthis/\*'; shell_exec($output); ?>
But when I download and open the archive, the archive includes subfolders like /home ; /user ; /public_html , but these folders are completely unnecessary, and I want to know how to create zip without them.
When I try to do something like this $output = 'zip -rq my-zip.zip ../../../folder-one -x missthis/\*'; but then when i open the archive (on windows 7 OS) the name of the folder-one is ../folder-one
Postscript: it would be better if someone gives me the correct $output make zips on Windows hosting plans.
Regards, George!
user546774
source share