title: file_exists() not working codeigniter
body: <p>I am working with codeigniter. I want to display images but if some image is not exist it should show <code>image-not-found-medium.jpg</code> which is dummy image..</p>
  
  <p>below is my code</p>
  
  <pre><code>&lt;?php
      $image_path_medium = site_url('assets/images-products/medium');
      $image_not_found_medium =  $image_path_medium . "/" . "image-not-found-medium.jpg";
      $image_name_with_path = $image_path_medium . "/" . $home_technology[$key]-&gt;product_sku . "-" . "a" . "-medium.jpg";
  
      if (file_exists($image_name_with_path)) {
          echo $image_name_with_path;
      } else {
          echo $image_not_found_medium;
      }
      ?&gt;
  </code></pre>
  
  <p>but it always shows <code>$image_not_found_medium</code> i think there is problem with my <code>if condition</code>.
  Please help.</p>