title: how to fix [function.getimagesize]: failed to open stream: in php?
body: <p>i have a worning massege only on localhost...</p>
  
  <blockquote>
    <p>"Warning: getimagesize(images/cat/)
    [function.getimagesize]: failed to
    open stream: No such file or directory
    in
    C:\xampp\htdocs\gifts\libraries\leftmenu.php
    on line 104"</p>
  </blockquote>
  
  <pre><code>while($cat=mysql_fetch_object($cats))
      {
  
  
          $maincatname = str_replace("&amp;","--",$cat-&gt;name);
          $image=$cat-&gt;image; 
          $catid=$cat-&gt;categoryID;
              $image_upload_path = "images/cat/";
                  $url = $image_upload_path.$cat-&gt;image;              
                      $www = getimagesize($url);          
  
                      if (getimagesize($url))
                  { 
                      $www = getimagesize($url);   //echo print_r($www). "&lt;br&gt;"; 
                      $width=$www[0]; //echo $width."...&lt;br&gt;";
  
                      if ($www[0] &gt; 120)
                      { 
                          $www = "181";
                      }
                  }
  </code></pre>