title: PHP writing to file on server
body: <p>I'm  trying to write to a file on my local server and I can't figure out why, I haven't found any good reason why what I'm doing should not work. </p>
  
  <p>What I've tryed:</p>
  
  <pre><code>file_put_contents("./lol.txt", "Contents");
  file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/lil.txt", "Contents");
  file_put_contents($_SERVER['DOCUMENT_ROOT'] . "lal.txt", "Contents");
  file_put_contents("lel.txt", "Contents");
  </code></pre>
  
  <p>I will provide any additional info if needed.</p>