title: Using PHP to execute cmd commands
body: <p>How do I properly execute commands in the command line using php? For example I'm using the command below in the command line to convert a docx file into a pdf file:</p>
  
  <pre><code>pdfcreator.exe /PF"D:\Documents\sample.docx
  </code></pre>
  
  <p>Now using PHP code I want to be able to execute the same command but nothing seems to be happening:</p>
  
  <pre><code>&lt;?php
  shell_exec('pdfcreator.exe /PF"D:\Documents\sample.docx"');
  ?&gt;
  </code></pre>
  
  <p>Is this possible in PHP?If yes, how do I do it?</p>