firstly I don't which is the correct stackExchange site to post this question if the question is for other stack-site please remove my question.
Now let talk about the question: This situation is I have a file which is located in: /home/user/public_html/folder-one/folder-two/folder-three/file.php
and the file must create archive of folder /folder-one
with all files and sub-folders of /folder-one
. I create the archive with system function (exec(), shell_exec() or system()) and it works perfect. 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 include the sub-folders as /home
; /user
; /public_html
but this folders are totally unneeded and I wanna know how to create zip without them.
When I try with something like this $output = 'zip -rq my-zip.zip ../../../folder-one -x missthis/\*';
but then when I open the archive (on Windows 7 based OS) the name of folder-one is ../folder-one
Postscript: It will be better if somebody gives me correct $output
the make zips on windows based hosting plans.
Best regards, George!