I would like to tar a directory without retaining the directory structure, for example I am tarring like this
shell_exec('tar czf '. __DIR__ .'/tmp/'.$entry.'.tar.gz /home/minecraft/multicraft/servers/'.$entry);
This works fine and correctly but when I open the .tar.gz it is shown like this
I would like to not retain the directory structure just the folder contents without the directory structure. So like, the .tar.gz contains /home/minecraft/multicraft/servers/server1 I just would like to only have the contents of the directory server1 in the .tar.gz
contents of server1:
If anyone could be of any help on this, it would be greatly appreciated!