When i'm in SSH i can zip and encrypt a file by doing the following:
[root@www tmp]# zip -e file.zip file.txt
Enter password: *****
Verify password: *****
adding: file.txt (deflated 71%)
My question is, how can i do this from a php script?
I tried this:
$cmd .= "zip -e test.zip test.txt;";
$cmd .= "example;example";
print_r(shell_exec($cmd . " 2>&1"));
but it errors saying: sh: line 1: example: command not found