title: how to get image file size with php
body: <p>I am trying to find a PHP function that will allow me to determine the file size of images uploaded. i.e. I want to block images over a certain size. </p>
  
  <p>I tried using the <code>getimagesize();</code> function but this only seem to give the width and height of an image. </p>
  
  <p>I have enclosed below the array values returned from  the getimagesize function. Unless i am mistaken, there is nothing in this array that relates to the actual file size</p>
  
  <pre><code>array(6) { [0]=&gt; int(800) [1]=&gt; int(800) [2]=&gt; int(3) [3]=&gt; string(24) "width="800" height="800"" ["bits"]=&gt; int(music) ["mime"]=&gt; string(9) "image/png" }
  </code></pre>