title: form upload files can not be displayed
body: <p>the form upload files can not be displayed, and this is my form upload code</p>
  <pre><code>&lt;?php
  $imageinfo = getimagesize($_FILES['img']['tmp_name']);
  if($imageinfo['mime'] != 'image/gif' &amp;&amp; $imageinfo['mime'] != 'image/jpeg') {
  echo &quot;&lt;center&gt;&lt;br&gt;Sorry, we only accept GIF and JPEG images&lt;/br&gt;&lt;br&gt;param name: img&lt;br&gt;u can upload 
  with CSRF&quot;;
  exit;
  }
  $uploaddir = 'ex/';
  $uploadfile = $uploaddir . basename($_FILES['img']['name']);
  if (move_uploaded_file($_FILES['img']['tmp_name'], $uploadfile)) {
  echo &quot;File is valid, and was successfully uploaded.\n&quot;;
  } else {
  echo &quot;File uploading failed.\n&quot;;
  }?&gt;
  &lt;form action=&quot;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
  &lt;input type=&quot;file&quot; size=&quot;20&quot; name=&quot;img&quot; /&gt;
  &lt;input type=&quot;submit&quot; name=&quot;upload&quot; value=&quot;Upload&quot; /&gt;
  &lt;/form&gt;
  </code></pre>
  <p>the result is</p>
  <pre><code>Sorry, we only accept GIF and JPEG images
  param name: img
  u can upload with CSRF
  </code></pre>
  <p>i want to display form upload files</p>