title: PHP file_exists($var) not working
body: <p>I'm trying to write some code on my notebook and am using the xampp environment. I have the following piece of code:</p>
  
  <pre><code>class A {
  ...
    foreach ($blocks as $block) {
      $block = 'dir/dir2/' . $block;
    }
    if (file_exists($block) == true) {
      $var .= file_get_contents($block);
    }
  }
  </code></pre>
  
  <p>When I echo the $block variable in the foreach loop, it gives back the path to the files. However, the file_exists function always returns false. Could you please help me figure out what's wrong here?</p>