PHP exec() not executing batch files
- by Andreas Bonini
I tried googling for this issue and found many people with the same problem but no solution.
$result = exec("C:\\Ruby191\\bin\\lessc.bat less\\$file", $output);
Here result is an empty string and output an empty array. Same thing with:
$result = exec("cmd /c C:\\Ruby191\\bin\\lessc.bat less\\$file", $output);
I am sure the path is correct; I am sure exec() is enabled.
I tried exec, shell_exec, system and none work.
lessc is less CSS.