title: Renaming a file on log out
body: <p>I'm trying to rename a file with PHP but for some reason it doesnt work, do I have to activate some special permissions under PHP?</p>
  
  <p>heres my code for the php file</p>
  
  <pre><code>&lt;?php
    if(!rename('file.php','filer.php'))
    {
      echo "Couldn't rename file!";
    }
    else 
    {
      echo "file renamed succesfully!";
    }
  ?&gt;
  </code></pre>
  
  <p>I'm trying to rename a file on my <code>/var/www</code> directory when they sign out of a login area, so that way they cant access back hitting back button. Do I have an error on my code? Or is there another way to prevent this?</p>