title: Unrar in php by exec()
body: <p>I successfully unrar rar file in php with this simple command</p>
  
  <pre><code>$file="folder/$filename";
  $string="unrar e '$file'";
  exec($string);
  </code></pre>
  
  <p>The problem is that it does not unrar within the folder. It will copy files into the main directory, instead of the folder in which the rar file exists.</p>