Need help executing a .bat file using PHP
<p>I am trying to execute a .bat file (m.bat) using a simple php script: </p>

<pre><code>&lt;?php
if(isset($_POST['submit']))
{
echo exec('m.bat');
echo "Done!";
} else {
    ?&gt;
&lt;form action="" method="post"&gt;
&lt;input type="submit" name="submit" value="Run"&gt;
&lt;/form&gt;
&lt;?php
}
?&gt;
</code></pre>

<p>this just displays the content of the .bat file in the browser, and if I drop the 'echo' before 'exec' it does nothing at all. :(  </p>
