title: How to shutdown my system via a php site using LAMP server?
body: <p>This is the code i have so far</p>
  
  <p>site:</p>
  
  <pre><code>&lt;?php
  if ($_POST['action']=="Shutdown") {
      $test=shell_exec("touch /scripts/shutdown.sh");
  }
  ?&gt;
  </code></pre>
  
  <p>shutdown.sh:</p>
  
  <pre><code>#!/bin/sh
  if [ -f "/tmp/shutdown" ]
  then
     rm -f /tmp/shutdown
     /sbin/shutdown now
  fi
  </code></pre>
  
  <p>I roughly got the idea from <a href="http://ubuntuforums.org/showthread.php?t=1855905" rel="nofollow">http://ubuntuforums.org/</a> But, when i run the php script on my local-host, it doesn't show up?  </p>
  
  <p><strong>Question</strong>: <em>How to shutdown my system via a php site using LAMP server?</em><br></p>
  
  <p>Thanks in advance!</p>