title: How to run phonegap using php?
body: <p>how to run phonegap cli using php scripts?<br>
  i can manually run phonegap with windows cmd and everything works great but when i call ex:'phonegap build android' in php exec, nothing happens. no error no catch block, nothing.<br>
  <br>
  here is my code:<br>
  <br></p>
  
  <p>test.php<br></p>
  
  <pre><code>&lt;?php
  $out = array();
  try {
      $create_command = 'phonegap create test';
      $build_command = 'phonegap build android';
      exec($build_command,$out);
      foreach($out as $line) echo $line.'&lt;br&gt;';
  }
  catch(Exception $ex) {
      echo $ex-&gt;getMessage();
  }
  ?&gt;
  </code></pre>
  
  <p>by the way i registered php in environments then ran 'php %path_to_file%/test.php' in cmd and it worked.</p>