getimagezise Error pasing filename
<p>I am using getimagesize() to get teh size of my image. I have image in my sub-directory when i am passing file name with sub-directory i ma facing an error:</p>

<blockquote>
  <p>There is no such file or directory</p>
</blockquote>

<p>here is my Code:</p>

<pre><code>&lt;?PHP
     function resize($img,$max_w){
     $max_h=$max_w;
     list($img_w,$img_h) = getimagesize($img);
     $f = min($max_w/$img_w, $max_h/$img_h, 1);
        $w = round($f * $img_w);
        $h = round($f * $img_h); 
     return array($w,$h);
}

$filename="user_img/"."1256115556.jpg";
$resize=resize($filename,667);
$w=$resize[0];
$h=$resize[1];
?&gt;
</code></pre>

<p>instead of this when i passing</p>

<pre><code>$filename="1256115556.jpg";
</code></pre>

<p>file from my main directory the function is running perfectly. So please help me, How to pass file with sub-directory.</p>
