PHP exec_shell using unrar.exe
I'm running the following php code;
$output = exec('"D:\TESTDIR\unrar.exe" e "D:\TESTDIR\Icons.rar" -ppassword');
echo $output;
Which isn't working... I want it to extract the files into the same directory. If I copy the cont开发者_运维技巧ents of the exec into a command line prompt it works just fine, so slightly confused.
Trying the following;
$output = exec('"D:\TESTDIR\unrar.exe"');
echo $output;
Returns the last line of the unrar help file (which is expected).
Is it possible to add a destination to the command so you can tell unrar where to place the unpacked files?
Probably PHP now is trying to unpack it in the directory the php file is located.
精彩评论