title: How to base64 encode a $_FILES file on a form post?
body: <p>How can I base64 encode a file sent from one page to another via a form <code>POST</code>.</p>
  <p>The following do not work:</p>
  <ul>
  <li><code>base64_encode($_FILES['file'])</code></li>
  <li><code>base64_encode(file_get_contents($_FILES['file']))</code></li>
  <li><code>base64_encode(file_get_contents($_FILES['file']['name']))</code></li>
  </ul>
  <p>Why don't they work?</p>
  <p>What is the correct thing to do to base64 encode the file?</p>