Closed
Description
If my php file is being executed from my E:\ drive to a command running on my C:\ drive, it doesn't work since the cd is happening on the wrong drive.
I fixed it by doing the following:
$drive = substr($command, 0, 2);
$command = sprintf($drive . ' && cd %s && %s', escapeshellarg(dirname($command)), basename($command));
So $command becomes:
C: && cd "C:\Program Files\wkhtmltopdf\bin" && wkhtmltopdf.exe