title: How to save $_GET data to a file PHP
body: <p>I'm trying to save all key values from the <code>GET</code> parameters, but its not writing anything to the file.</p>
  
  <pre><code>foreach ($_GET as $key =&gt; $value) {
     $contents = $key . " =&gt; " . $value . "&lt;br&gt;";
     echo($contents);
     file_put_contents("./test.log", $contents, FILE_APPEND);
  }
  </code></pre>