title: PHP copy() creates an empty image file
body: <p>I have one image in a directory on my server, and want to copy it to another directory.</p>
  
  <p>So I'm using</p>
  
  <pre><code>$post_picture = 'http://mysite.com/image.jpg';
  
  copy($post_picture, 
           'images/pictures/post/thumb/' . 
           $info['filename'] . 
           '_thumb.' . 
           $info['extension']);
  </code></pre>
  
  <p>The issue is that in fact a file is created in my <code>thumb</code> directory, but that image is empty (0 x 0 pixels). I get no errors.</p>
  
  <p>Any idea what is happening?</p>
  
  <p>Permissions on all dirs are 755, both original and copy image have 644. The original show normally on a browser.</p>
  
  <p>Thanks.</p>