title: PHP - uploaded image not displaying properly
body: <p>I'm uploading a photo to my PHP server using this HTML form:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form action="photoServer.php" method="post" enctype="multipart/form-data"&gt;
  &lt;label for="file"&gt;Filename:&lt;/label&gt;
  &lt;input type="file" name="file" id="file"&gt;&lt;br&gt;
  &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And here's the PHP server code
      
  
  <pre><code>header('Content-type: image/jpeg');
  
  $target_path = "photoServer.php";
  $fname = $_FILES["file"]["name"];
  $target = $target_path. '/' . $fname;
  
  move_uploaded_file($_FILES["file"]["tmp_name"], $target);
  
  echo "&lt;p&gt; Here's your image! $fname &lt;/p&gt; &lt;/br&gt;"; 
  echo "&lt;img src=$target &gt;";
  
  ?&gt;
  </code></pre>
  
  <p>Here's what happens when I run this PHP code. I get a small thumbnail instead of camera.jpeg</p>
  
  <p><img src="https://i.stack.imgur.com/dCqQv.png" alt="Here&#39;s the captured image of the echo HTML result"></p>
  
  <p>and here's the HTML element for that display thumbnail</p>
  
  <pre><code>&lt;img src="photoServer.php/camera.jpeg"&gt;
  </code></pre>
  
  <p>Anyone have a clue as to what's going on?</p>