Reputation: 6739
My exec command looks like
exec("program.exe -x arg -o "something" $url");
Notice that here that something MUST be in double quotes or else the command won't work
I tried the following but all failed
exec("program.exe -x arg -o \"something\" $url");
exec('program.exe -x arg -o "something" $url');
Upvotes: 0
Views: 66
Reputation: 6739
In fact i already had the correct answer
exec("program.exe -x arg -o \"something\" $url");
Works Perfect.
Most probably these alternatives work great as well
exec('program.exe -x arg -o' . '"something"' . $url);
OR
exec('program.exe -x arg -o "something" ' . $url);
Actually i have mistype the command and that's the reason why it was not working....
Upvotes: 0
Reputation: 912
exec('program.exe -x arg -o' . '"something"' . $url);
OR
exec('program.exe -x arg -o "something" ' . $url);
Upvotes: 1