executing python script from php under windows

Pendaorer

New Member
Okay this works with my linux server but I'm testing my web site at home on my PC and am trying to get php to execute my python script and of course the \ are WINDOWS only the path changes when Im on my linux machine.\[code\]$pyscript = 'C:\\wamp\\www\\testing\\scripts\\imageHandle.py';$python = 'C:\\Python27\\python.exe';$filePath = 'C:\\wamp\\www\\testing\\uploads\\thumbs\\10-05-2012-523.jpeg'exec('$python $pyscript $filePath', $output, $return );\[/code\]this works on my linux machine but not my windows testing server. How do I get this to run on windows? Oh and this also works when running directly from the command prompt in windowsEDIT:THIS IS THE SOLUTION as you can read in the answer.\[code\]$cmd = "$python $pyscript $filePath";exec("$cmd", $output);\[/code\]works like a charm. Changed single ticks to double.
 
Back
Top