title: php glob() not finding any files
body: <pre><code>$directory = $_SESSION['base_url'] . "assets/images/*.jpg";
  $images = glob($directory);
  </code></pre>
  
  <p>This code is not working. If I print out $directory, it matches the directory where I have put some .jpg files. $images just remains empty...</p>
  
  <p>As <strong>bsdnoobz</strong> answered, this was my solution:</p>
  
  <pre><code>$directory = dirname(dirname(dirname(__FILE__))) . "\assets\images\\"; //escape
  $images = glob($directory . "*.jpg");
  </code></pre>