title: php include (cannot get correct path)
body: <p>I have a file that resides in:</p>
  
  <pre><code>/Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/sidebar-left-big.php
  </code></pre>
  
  <p>I have another file in sub directory:</p>
  
  <pre><code>/Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/template_directorypress/_gallerypage.php
  </code></pre>
  
  <p>And in _gallerypage.php I have php include:</p>
  
  <pre><code>&lt;?php include('../sidebar-left-big.php'); //left sidebar, category navigation and ads ?&gt;
  </code></pre>
  
  <p>Error I get:</p>
  
  <pre><code>Warning: include(../sidebar-left-big.php) [function.include]: failed to open stream: No such file or directory in /Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/template_directorypress/_gallerypage.php on line 9
  
  Warning: include() [function.include]: Failed opening '../sidebar-left-big.php' for inclusion (include_path='.:') in /Library/WebServer/Documents/wordpress/wp-content/themes/directorypress/template_directorypress/_gallerypage.php on line 9
  </code></pre>
  
  <p>It seems to me I'm doing everything correctly.</p>
  
  <p>I thought that maybe problem is that _gallerypage.php is loaded via include in another file, so ../ relative to that leads to error. But error doesn't say anything as to where it thinks path to sidebar-left-big.php is.</p>