title: Checking exec() runs successfully or not
body: <p>I have been trying to let know know if the <code>exec()</code> command in php executes successfully or not so i can echo certain messages accordingly.
  I tried the following piece of code but the problem with it is that whether <code>exec()</code> runs successfully or not it always <code>echo "PDF not created"</code> and never echo pdf created successfully. Kindly let me know how can i perform the check on the execution of exec() so i can echo messages accordingly 
  Thanks,</p>
  
  <pre><code>&lt;?php
  if (exec('C://abc//wkhtmltopdf home.html sample.pdf'))
  echo "PDF Created Successfully";
  else
  echo "PDF not created";
  ?&gt;
  </code></pre>