Warning: fopen() expects parameter 1 to be string, array given in /home/speedycm/public_html/speedyautos/carphoto.php on line 47
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a>  </p>
</blockquote>



<p>i am trying to upload a jpeg image on a website i am working on but keep receiving the following error:</p>

<pre><code>Warning: fopen() expects parameter 1 to be string, array given in /home/speedycm/public_html/speedyautos/carphoto.php on line 47
Warning: filesize() [function.filesize]: stat failed for Array in /home/speedycm/public_html/speedyautos/carphoto.php on line 48
Warning: fread(): supplied argument is not a valid stream resource in /home/speedycm/public_html/speedyautos/carphoto.php on line 48
Warning: fclose(): supplied argument is not a valid stream resource in /home/speedycm/public_html/speedyautos/carphoto.php on line 49
</code></pre>

<p>the file carphoto.php has the following code on lines 47-49</p>

<pre><code>    $fp = fopen($_FILES["pics"]["tmp_name"], 'rb'); 
$contents = fread($fp, filesize($_FILES["pics"]["tmp_name"]));  
fclose($fp);
</code></pre>

<p>thanking you in advance</p>
