title: executing python script from php under windows
body: <p>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.</p>
  <pre><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></pre>
  <p>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 windows</p>
  <p>EDIT:</p>
  <p>This is the solution:</p>
  <pre><code>exec(&quot;$python $pyscript $filePath&quot;, $output);
  </code></pre>
  <p>I used single quotes instead of double quotes before, changing the single quotes to double quotes fixed the problem.</p>