Users Pricing

forum

home / developersection / forums / exec doesn't execute command if path contains whitespaces

exec doesn't execute command if path contains whitespaces

Manoj Bhatt 2752 10 May 2013
Hi Expert!

When I do something like

exec("c:\\Program Files (x86)\\wkhtmltopdf\\wkhtmltopdf.exe --footer-center as  http://bbc.co.uk c:\\test2.pdf",$output);
nothing happens. File exists and the following line returns 1.

echo file_exists("c:\\Program Files (x86)\\wkhtmltopdf\\wkhtmltopdf.exe");
If I change it

 exec("d:\\wkhtmltopdf\\wkhtmltopdf.exe --footer-center as  http://bbc.co.uk c:\\test2.pdf",$output);
works fine. Can that be fixed?

Thanks in advance! 

Manoj Bhatt

Other


1 Answers